CompositeTransactionManager ctm = Configuration
.getCompositeTransactionManager ();
if ( ctm == null )
return;
CompositeTransaction ct = ctm.getCompositeTransaction ();
if ( ct != null && ct.getProperty ( TransactionManagerImp.JTA_PROPERTY_NAME ) != null ) {
// if we are already in another (parent) tx then reject this,
// because nested tx rollback can not be supported!!!
if ( isInTransaction () && !isInTransaction ( ct ) )
AtomikosSQLException.throwAtomikosSQLException (
"Connection accessed by transaction "
+ ct.getTid ()
+ " is already in use in another transaction: "
+ transaction.getTid ()
+ " Non-XA connections are not compatible with nested transaction use." );
setTransaction ( ct );
if ( participant == null ) {
// make sure we add a participant for commit/rollback
// notifications
participant = new AtomikosNonXAParticipant ( this , resourceName );
participant.setReadOnly ( readOnly );
ct.addParticipant ( participant );
originalAutoCommitState = wrapped.getAutoCommit();
wrapped.setAutoCommit ( false );
}
} else {