|
org.hibernate.jpa.spi.AbstractEntityManagerImpl.joinTransaction(boolean explicitRequest) used to check if a transaction is active and throw a TransactionRequiredException if not. We seemed to lose that with the
HHH-9747
change. Old code:
if ( transaction.getJoinStatus() == JoinStatus.NOT_JOINED ) {
if ( explicitRequest ) {
throw new TransactionRequiredException( "No active JTA transaction on joinTransaction call" );
}
else {
LOG.debug( "Unable to join JTA transaction" );
return;
}
Javadoc for EntityManager.joinTransaction():
void joinTransaction()
Indicate to the entity manager that a JTA transaction is active. This method should be called on a JTA application managed entity manager that was created outside the scope of the active transaction to associate it with the current JTA transaction.
Throws: TransactionRequiredException - if there is no transaction
|