[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3900) Do not attempt to register Synchronization when Transaction is in STATUS_MARKED_ROLLBACK

Chris Bredesen (JIRA) noreply at atlassian.com
Tue Jun 16 09:10:33 EDT 2009


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3900?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33419#action_33419 ] 

Chris Bredesen commented on HHH-3900:
-------------------------------------

Yeah that's the same issue.  The thing is, even though Hibernate does generate an error here, you'd wind up getting an Exception eventually.  Since the Transaction is in STATUS_MARKED_ROLLBACK,  you won't be able to do any JDBC operations.  This just creates a red herring.

> Do not attempt to register Synchronization when Transaction is in STATUS_MARKED_ROLLBACK
> ----------------------------------------------------------------------------------------
>
>                 Key: HHH-3900
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3900
>             Project: Hibernate Core
>          Issue Type: Bug
>    Affects Versions: 3.2.6, 3.3.1
>            Reporter: Chris Bredesen
>            Priority: Minor
>
> In JTASessionContext.currentSession(), a CleanupSync is built and registered.  The transaction is verified to be in progress using JTAHelper.isInProgress() which checks for STATUS_ACTIVE or STATUS_MARKED_ROLLBACK.  JBossTS (based on the OTS standard) disallows the registration of Synchronizations in STATUS_MARKED_ROLLBACK and so in such cases, JTASessionContext.currentSession() will fail.  The stack trace looks something like this (note no wrapped root cause):
> Caused by: org.hibernate.HibernateException: Unable to register cleanup Synchronization with TransactionManager
> at org.hibernate.context.JTASessionContext.currentSession(JTASessionContext.java:92)
> at org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:544)
> A possible fix is to check only for STATUS_ACTIVE and do any needed cleanup work proactively if the Transaction is in STATUS_MARKED_ROLLBACK rather than relying on CleanupSync.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list