@ Override public void setRollbackOnly ( ) throws IllegalStateException , SystemException { if ( trace ) { log . tracef ( "Transaction.setRollbackOnly() invoked in transaction with Xid=%s" , xid ) ; } if ( isDone ( ) ) { throw new IllegalStateException ( "Transaction is done. Cannot change status" ) ; } markRollbackOnly ( new RollbackException ( "Transaction marked as rollback only." ) ) ; }
Mark the transaction so that the only possible outcome is a rollback .