BTM
  1. BTM
  2. BTM-120

JmsPooledConnection can get one session twice

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.1.3
    • Fix Version/s: 3.0.0
    • Labels:
      None
    • Patch Submitted:
      Yes
    • Number of attachments :
      1

      Description

      the bug in JmsPooledConnection class method
      protected Session createSession(boolean transacted, int acknowledgeMode).
      the code execute 2 lines without any synchronization
      DualSessionWrapper sessionHandle = getNotAccessibleSession();
      and
      sessionHandle.setState(XAResourceHolder.STATE_ACCESSIBLE);

      getNotAccessibleSession() based on sessionHandle.getState() == XAResourceHolder.STATE_NOT_ACCESSIBLE.
      So 2 thread can executes getNotAccessibleSession() in asynchronous execution and get one instance of DualSessionWrapper.

      I can reproduce the bug when have staerted and commined session and after that execute code which get new session send message and close session.

        Activity

        Hide
        Ludovic Orban added a comment - - edited

        (I didn't notice you already submitted a patch) - Thanks for the report, I'm going to have a look at your patch and come back to you shortly.

        Show
        Ludovic Orban added a comment - - edited (I didn't notice you already submitted a patch) - Thanks for the report, I'm going to have a look at your patch and come back to you shortly.
        Hide
        Ludovic Orban added a comment -

        Fixed in master, I'd be glad if you could build the master and try out the upcoming version 3.0.0 that contains the fix and report back the result.

        Thanks!

        Show
        Ludovic Orban added a comment - Fixed in master, I'd be glad if you could build the master and try out the upcoming version 3.0.0 that contains the fix and report back the result. Thanks!

          People

          • Assignee:
            Ludovic Orban
            Reporter:
            Eugeney Putilin
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: