mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-17 16:44:57 +00:00
HHH-13076 - Hibernate 'Transaction already active' behaviour with JTA transaction manager
(cherry picked from commit a15dfe0e056c55664846b621c0d880ef2e367fff)
This commit is contained in:
parent
e88e45cf38
commit
14f5473fef
@ -72,7 +72,13 @@ public void begin() {
|
||||
|
||||
// per-JPA
|
||||
if ( isActive() ) {
|
||||
throw new IllegalStateException( "Transaction already active" );
|
||||
if ( jpaCompliance.isJpaTransactionComplianceEnabled()
|
||||
|| !transactionCoordinator.getTransactionCoordinatorBuilder().isJta() ) {
|
||||
throw new IllegalStateException( "Transaction already active" );
|
||||
}
|
||||
else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
LOG.debug( "begin" );
|
||||
|
Loading…
x
Reference in New Issue
Block a user