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