[jboss-jira] [JBoss JIRA] (AS7-3335) JPA after_completion Synchronization expects to be able to TransactionSynchronizationRegistry::putResource on a committed (i.e. inactive) transaction
Scott Marlow (JIRA)
jira-events at lists.jboss.org
Tue Jan 17 09:51:18 EST 2012
[ https://issues.jboss.org/browse/AS7-3335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12659859#comment-12659859 ]
Scott Marlow commented on AS7-3335:
-----------------------------------
<smarlow> tomjenkinson: I was just looking at AS7-3335. I'm only calling "getInstance().putEntityManagerInTransactionRegistry(scopedPuName, null)" because I am paranoid about clearing the reference, Is that done automatically by jbosstm?
<tomjenkinson> smarlow: hi
<smarlow> hi tomjenkinson
<tomjenkinson> smarlow: yeah, blanking the call should be enough
<smarlow> tomjenkinson: removing the call? Because it will happen automatically when the tx ends?
<tomjenkinson> smarlow: the resources are related to "Get an object from the Map of resources being managed for the transaction bound to the current thread at the time this method is called."
<tomjenkinson> smarlow: so yeah, the hashmap should be cleaned up by the TX, don't worry, removing the call should be enough
> JPA after_completion Synchronization expects to be able to TransactionSynchronizationRegistry::putResource on a committed (i.e. inactive) transaction
> -----------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: AS7-3335
> URL: https://issues.jboss.org/browse/AS7-3335
> Project: Application Server 7
> Issue Type: Bug
> Components: JPA / Hibernate
> Reporter: Tom Jenkinson
> Assignee: Scott Marlow
>
> 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!
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list