public synchronized void exit () throws WrongStateException, UnknownTransactionException, SystemException { /* * Active -> illegal state * Canceling -> illegal state * Completed -> illegal state * Closing -> illegal state * Compensating -> illegal state * Failing-Active -> illegal state * Failing-Canceling -> illegal state * Failing-Compensating -> illegal state * NotCompleting -> illegal state * Exiting -> no response * Ended -> ended */ final State state = coordinator.exit() ; if (state == State.STATE_EXITING) { throw new SystemException() ; } else if (state != State.STATE_ENDED) { throw new WrongStateException() ; } }
public synchronized void exit () throws WrongStateException, UnknownTransactionException, SystemException { /* * Active -> illegal state * Canceling -> illegal state * Completed -> illegal state * Closing -> illegal state * Compensating -> illegal state * Failing-Active -> illegal state * Failing-Canceling -> illegal state * Failing-Compensating -> illegal state * NotCompleting -> illegal state * Exiting -> no response * Ended -> ended */ final State state = coordinator.exit() ; if (state == State.STATE_EXITING) { throw new SystemException() ; } else if (state != State.STATE_ENDED) { throw new WrongStateException() ; } }
public synchronized void exit () throws WrongStateException, UnknownTransactionException, SystemException { /* * Active -> illegal state * Canceling -> illegal state * Completed -> illegal state * Closing -> illegal state * Compensating -> illegal state * Failing-Active -> illegal state * Failing-Canceling -> illegal state * Failing-Compensating -> illegal state * NotCompleting -> illegal state * Exiting -> no response * Ended -> ended */ final State state = coordinator.exit() ; if (state == State.STATE_EXITING) { throw new SystemException() ; } else if (state != State.STATE_ENDED) { throw new WrongStateException() ; } }