WebSphereExtendedJTATransactionLookup doesn't correctly identify a rollback to
AbstractEntityManagerImpl
--------------------------------------------------------------------------------------------------------
Key: HHH-4458
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4458
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.2.7
Reporter: Mike Youngstrom
I'm using WebSphereExtendedJTATransactionLookup with Hibernate EntityManager in
Websphere 6.1. I noticed that if I have a transaction rollback it does not clear my
PersistenceContext. I traced problem down to
WebSphereExtendedJTATransactionLookup.TransactionAdapter.registerSynchronization.
It appears that when handling afterCompletion of a rollback websphere is passing
args[2]=false. The adapter is translating that to "STATUS_UNKNOWN" which is not
identified by AbstractEntityManagerImpl.joinTransaction()'s Synchronization as a
rollbackable status as it only looks for STATUS_ROLLEDBACK.
I wonder if WebSphereExtendedJTATransactionLookup should be detecting args[2]=false as
STATUS_ROLLEDBACK instead of STATUS_UNKNOWN. I made that change locally and it appears to
work.
To patch I simply changed WebSphereExtendedJTATransactionLookup:138 to STATUS_ROLLEDBACK.
--
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira