Skip to content
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

Can't use Jaybird with distributed transactions. Calling close on a connection triggers exception [JDBC362] #404

Closed
firebird-automations opened this issue Sep 18, 2014 · 6 comments

Comments

@firebird-automations
Copy link

Submitted by: @doychin

Is related to JDBC344

When a connection is requested from a datasource and later that connection is closed an exception is thrown

Caused by: org.firebirdsql.jdbc.FBSQLException: Connection enlisted in distributed transaction
at org.firebirdsql.jdbc.AbstractConnection.setAutoCommit(AbstractConnection.java:436)
at org.firebirdsql.jdbc.AbstractConnection.close(AbstractConnection.java:566)

Commits: e3ee841 30509f7 FirebirdSQL/fbt-repository@d88235f FirebirdSQL/fbt-repository@58a0b0b

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

Link: This issue is related to JDBC344 [ JDBC344 ]

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

It looks like I broke this when fixing JDBC344. The current expectation of the close() method is "// autocommit is always true for managed tx.", but that is no longer true.

I also need to review the tests as it looks like this only happens when using distributed transactions with the JCA resource adapter instead of a JDBC XADataSource, and that combination doesn't seem to be covered in the tests.

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

Fix Version: Jaybird 2.2.6 [ 10588 ]

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

Commited a test to reproduce this, and a fix to 2.2.6 and 3.0

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: Jaybird 3.0 [ 10440 ]

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment