HHH-11407 - JPA + JDBC transaction - when a commit fails rollback is executed twice
This commit is contained in:
parent
c9df1a9981
commit
33ae0b3b9e
|
@ -250,14 +250,16 @@ public class JdbcResourceLocalTransactionCoordinatorImpl implements TransactionC
|
|||
|
||||
@Override
|
||||
public void markRollbackOnly() {
|
||||
if ( log.isDebugEnabled() ) {
|
||||
log.debug(
|
||||
"JDBC transaction marked for rollback-only (exception provided for stack trace)",
|
||||
new Exception( "exception just for purpose of providing stack trace" )
|
||||
);
|
||||
}
|
||||
if ( getStatus() != TransactionStatus.ROLLED_BACK && getStatus() != TransactionStatus.NOT_ACTIVE ) {
|
||||
if ( log.isDebugEnabled() ) {
|
||||
log.debug(
|
||||
"JDBC transaction marked for rollback-only (exception provided for stack trace)",
|
||||
new Exception( "exception just for purpose of providing stack trace" )
|
||||
);
|
||||
}
|
||||
|
||||
rollbackOnly = true;
|
||||
rollbackOnly = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue