BTM
  1. BTM
  2. BTM-88

Rollback makes LrcXAResource unusable

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.3, 2.0.1
    • Fix Version/s: 2.1.0
    • Labels:
      None
    • Testcase included:
      yes
    • Patch Submitted:
      Yes
    • Number of attachments :
      1

      Description

      Hi,

      I'm currently using the BTM 1.3.3 with a JDBC LrcXAResource. (I check the BTM 2.0.1, but the error is still present)

      I encountered an error on the LrcXAResource.rollback method. Due to this error the state and the xid fields aren't initialized to NO_TX and null in the instance of LrcXAResource.

      So when a new transaction wants to use the LrcXAResource, we have an exception because the state is still ENDED.

      In attachment, you can find test cases which reproduce the problem (test/bitronix/tm/mock/NewJdbcWrongLrcXAResourceStateMockTest.java) and a patch proposal to fix it in the BTM 1.3.3.

      Regards,
      Eric

        Activity

        Hide
        Ludovic Orban added a comment -

        I think you're right and your change is fine but your test isn't fitting very well in the current test suite b/c of junit 4, annotations and other misc stuff.

        As soon as I can find some time I'll clean it up, unless you can do it yourself which would save time to both of us.

        Thanks for the contribution!

        Show
        Ludovic Orban added a comment - I think you're right and your change is fine but your test isn't fitting very well in the current test suite b/c of junit 4, annotations and other misc stuff. As soon as I can find some time I'll clean it up, unless you can do it yourself which would save time to both of us. Thanks for the contribution!
        Hide
        Ludovic Orban added a comment -

        patch applied to trunk.

        Show
        Ludovic Orban added a comment - patch applied to trunk.

          People

          • Assignee:
            Ludovic Orban
            Reporter:
            Eric Leleu
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: