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:
Steve Ebersole 2008-05-27 14:48:51 +00:00
parent 304673d721
commit eb2e83348b
1 changed files with 4 additions and 1 deletions

View File

@ -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;