Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-3335

JPA after_completion Synchronization expects to be able to TransactionSynchronizationRegistry::putResource on a committed (i.e. inactive) transaction

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 7.1.0.Final
    • None
    • JPA / Hibernate
    • None

    Description

      The JPA has registered an after_completion which incorrectly attempts to call putResource on the TransactionSynchronizationRegistry as the transaction is committed (therefore inactive).

      Offending code is in the jboss-as-jpa module:
      org.jboss.as.jpa.transaction.TransactionUtil.SessionSynchronization.afterCompletion
      getInstance().putEntityManagerInTransactionRegistry(scopedPuName, null);

      This is incorrect according to the specification as the transaction is now inactive:
      http://jcp.org/aboutJava/communityprocess/maintenance/jsr907/907ChangeLog.html#putResource

      Note, this was allowed in version 4.16.0.Final (and likely below) of JBoss Transactions, though it is now being fixed - sorry!

      Attachments

        Activity

          People

            smarlow1@redhat.com Scott Marlow
            thjenkin@redhat.com Tom Jenkinson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: