Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-6744

CMTTxInterceptor transaction comparison is invalid

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.1.0.DR8
    • 7.0.3.CR2
    • None
    • None

      In CMTTxInterceptor#endTransaction method:

      if (tx != tm.getTransaction())

      { throw EjbLogger.ROOT_LOGGER.wrongTxOnThread(tx, tm.getTransaction()); }

      We could not compare transaction objects using == opeator as there is no guarantee that the objects will be the same if they represent the same transaction. Specifically if the transaction is canceled because of timeout but it stays associated with the tread the transaction manager will create the new transaction object when the TransactionManager#getTransaction method is called. We should use equals operator instead.

              tadamski@redhat.com Tomasz Adamski
              tadamski@redhat.com Tomasz Adamski
              Daniel Simko Daniel Simko (Inactive)
              Daniel Simko Daniel Simko (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: