[hibernate-issues] [Hibernate-JIRA] Created: (HHH-3900) Do not attempt to register Synchronization when Transaction is in STATUS_MARKED_ROLLBACK
Chris Bredesen (JIRA)
noreply at atlassian.com
Wed May 6 17:57:14 EDT 2009
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.3.1, 3.2.6
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