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

Possible XA bug: local transaction should be suspended when starting XA transaction [JDBC189] #237

Open
firebird-automations opened this issue Sep 17, 2011 · 3 comments

Comments

@firebird-automations
Copy link

Submitted by: @mrotteveel

Assigned to: Roman Rokytskyy (rrokytskyy)

Potential bug (needs more investigation):
When XA start() is called on the XAResource an exception is thrown if the connection is currently involved in a local transaction. If I am reading the XA and JTA specs correctly this local transaction should be suspended when start() is called and resumed again on end().

Investigation required: re-read specs to see if above intepretation is correct.

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

description: Potential bug (needs more investigation):
When XA start() is called on the XAResource an exception is thrown if the connection is currently involved in a transaction. If I am reading the XA and JTA specs correctly this local transaction should be suspended when start() is called and resumed again on end().

Investigation required: re-read specs to see if above intepretation is correct.

=>

Potential bug (needs more investigation):
When XA start() is called on the XAResource an exception is thrown if the connection is currently involved in a local transaction. If I am reading the XA and JTA specs correctly this local transaction should be suspended when start() is called and resumed again on end().

Investigation required: re-read specs to see if above intepretation is correct.

@mrotteveel
Copy link
Member

From JTA 1.3, section 3.4.7 Local and Global Transactions:

When using the same connection to perform both local and global transactions, the following rules apply:

  • The local transaction must be committed (or rolled back) before starting a global transaction in the connection.
  • The global transaction must be disassociated from the connection before any local transaction is started.

In other words, a local transaction should not be suspended, and throwing an exception is the correct behaviour

@mrotteveel
Copy link
Member

I'll take this ticket as an opportunity to review the current XA code. It seems on occasion it returns wrong (or less specific) error codes.

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

No branches or pull requests

2 participants