HHH-12139 - Allow Hibernate's Transaction act like JPA's EntityTransaction
This commit is contained in:
parent
4b3a18a5b4
commit
e960f17a7b
|
@ -244,19 +244,21 @@ public class JdbcResourceLocalTransactionCoordinatorImpl implements TransactionC
|
|||
|
||||
try {
|
||||
rollback();
|
||||
|
||||
if ( jpaCompliance.isJpaTransactionComplianceEnabled() ) {
|
||||
log.debugf( "Throwing RollbackException on roll-back of transaction marked rollback-only on commit" );
|
||||
throw new RollbackException( "Transaction was marked for rollback-only" );
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
catch (RollbackException e) {
|
||||
throw e;
|
||||
}
|
||||
catch (RuntimeException e) {
|
||||
log.debug( "Encountered failure rolling back failed commit", e );
|
||||
throw e;
|
||||
}
|
||||
finally {
|
||||
if ( jpaCompliance.isJpaTransactionComplianceEnabled() ) {
|
||||
throw new RollbackException( "Transaction was marked for rollback-only" );
|
||||
}
|
||||
else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
JdbcResourceLocalTransactionCoordinatorImpl.this.beforeCompletionCallback();
|
||||
|
|
Loading…
Reference in New Issue