@ Override public int getStatus ( ) { int state = Status . STATUS_UNKNOWN ; switch ( _status . getState ( ) ) { case TransactionState . STATE_NONE : state = Status . STATUS_NO_TRANSACTION ; break ; case TransactionState . STATE_ACTIVE : if ( _rollbackOnly ) state = Status . STATUS_MARKED_ROLLBACK ; else state = Status . STATUS_ACTIVE ; break ; case TransactionState . STATE_PREPARING : case TransactionState . STATE_LAST_PARTICIPANT : state = Status . STATUS_PREPARING ; break ; case TransactionState . STATE_PREPARED : state = Status . STATUS_PREPARED ; break ; case TransactionState . STATE_COMMITTING : case TransactionState . STATE_COMMITTING_ONE_PHASE : state = Status . STATUS_COMMITTING ; break ; case TransactionState . STATE_HEURISTIC_ON_COMMIT : case TransactionState . STATE_COMMITTED : state = Status . STATUS_COMMITTED ; break ; case TransactionState . STATE_ROLLING_BACK : state = Status . STATUS_ROLLING_BACK ; break ; case TransactionState . STATE_HEURISTIC_ON_ROLLBACK : case TransactionState . STATE_ROLLED_BACK : state = Status . STATUS_ROLLEDBACK ; break ; } if ( tc . isDebugEnabled ( ) ) Tr . debug ( tc , "getStatus (SPI)" , Util . printStatus ( state ) ) ; return state ; }
Obtain the status of the transaction associated with the target object