HHH-1786 : current session cleanup synch hack for WebSphere.
git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@14691 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
parent
304673d721
commit
eb2e83348b
|
@ -118,7 +118,10 @@ public class JTASessionContext implements CurrentSessionContext {
|
|||
throw new HibernateException( "Unable to register cleanup Synchronization with TransactionManager" );
|
||||
}
|
||||
|
||||
currentSessionMap.put( txn, currentSession );
|
||||
Object txnIdentifier = factory.getSettings().getTransactionManagerLookup() == null
|
||||
? txn
|
||||
: factory.getSettings().getTransactionManagerLookup().getTransactionIdentifier( txn );
|
||||
currentSessionMap.put( txnIdentifier, currentSession );
|
||||
}
|
||||
|
||||
return currentSession;
|
||||
|
|
Loading…
Reference in New Issue