public static boolean isCompleted ( Transaction tx ) { if ( tx == null ) return true ; try { int status = tx . getStatus ( ) ; return status == Status . STATUS_COMMITTED || status == Status . STATUS_ROLLEDBACK || status == Status . STATUS_NO_TRANSACTION ; } catch ( SystemException error ) { throw new RuntimeException ( "Error during isCompleted()" , error ) ; } }
Is the transaction completed