]
Steve Ebersole closed HHH-3900.
-------------------------------
Resolution: Duplicate
HHH-1828
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: