HHH-6102 - ISE should be thrown when EM is colsed and joinTransaction is called, even with RESOURCE-LOCAL TX

This commit is contained in:
Strong Liu 2011-04-09 02:18:46 +08:00
parent dfcdab4a33
commit 72a2862ea9
1 changed files with 3 additions and 0 deletions

View File

@ -1143,6 +1143,9 @@ public abstract class AbstractEntityManagerImpl implements HibernateEntityManage
}
public void joinTransaction() {
if( !isOpen() ){
throw new IllegalStateException( "EntityManager is closed" );
}
joinTransaction( false );
}