Details
-
Bug
-
Resolution: Done
-
Major
-
None
-
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!