-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dev Services for Microsoft SQL server does not enable XA transactions when transaction type is XA #35336
Comments
Thanks @michalvavrik for reporting! And I think it needs to do something on the MSSQL server side to enable the xa transaction. Exec the following on the server
More information https://learn.microsoft.com/en-us/sql/connect/jdbc/understanding-xa-transactions |
I'll try it later today, thanks. |
note: I didn't get to it this week, will try it next week. |
hey @zhfeng , you were right, I have it working. I'd like to keep this issue open for I think our Dev Services should detect that XA transactions are used and prepare it. That's at least my opinion. Anyway, I experienced something that I didn't with other databases, you can't query the table that were part of this crashed transaction until the transaction is recovered. Is that expected? |
Describe the bug
I have application with Narayana JTA extension, using XA transactions and when 2 JDBC XA resources are involved, transaction always fail in DEV mode, for XA transactions are not enabled in SQL server.
Expected behavior
It would be very nice if dev svcs could enable it for me, it can be done like this
container.execInContainer( "/opt/mssql-tools/bin/sqlcmd", "-S", "localhost", "-U", getUsername(), "-P", getPassword(), "-Q", "EXEC sp_sqljdbc_xa_install");
Actual behavior
Transaction fails and exception is logged out
How to Reproduce?
Reproducer:
git clone [email protected]:michalvavrik/quarkus-narayana-jta-mssql-reproducer.git
cd quarkus-narayana-jta-mssql-reproducer
mvn clean test
Output of
uname -a
orver
Linux fedora 6.4.7-200.fc38.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jul 27 20:01:18 UTC 2023 x86_64 GNU/Linux
Output of
java -version
OpenJDK Runtime Environment Temurin-17.0.7+7 (build 17.0.7+7)
GraalVM version (if different from Java)
22.3
Quarkus version or git rev
3.2.4.Final and 999-SNAPSHOT
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.9.3
Additional information
No response
The text was updated successfully, but these errors were encountered: