public synchronized void close () throws WrongStateException, SystemException { /* * Active -> illegal state * Canceling -> illegal state * Completed -> illegal state * Closing -> no response * Compensating -> illegal state * Faulting -> illegal state * Faulting-Active -> illegal state * Faulting-Compensating -> illegal state * Exiting -> illegal state * Ended -> ended */ final State state = participant.close() ; if (state == State.STATE_CLOSING) { throw new SystemException() ; } else if (state != State.STATE_ENDED) { throw new WrongStateException() ; } }
public synchronized void close () throws WrongStateException, SystemException { /* * Active -> illegal state * Canceling -> illegal state * Completed -> illegal state * Closing -> no response * Compensating -> illegal state * Faulting -> illegal state * Faulting-Active -> illegal state * Faulting-Compensating -> illegal state * Exiting -> illegal state * Ended -> ended */ final State state = participant.close() ; if (state == State.STATE_CLOSING) { throw new SystemException() ; } else if (state != State.STATE_ENDED) { throw new WrongStateException() ; } }
public synchronized void close () throws WrongStateException, SystemException { /* * Active -> illegal state * Canceling -> illegal state * Completed -> illegal state * Closing -> no response * Compensating -> illegal state * Faulting -> illegal state * Faulting-Active -> illegal state * Faulting-Compensating -> illegal state * Exiting -> illegal state * Ended -> ended */ final State state = participant.close() ; if (state == State.STATE_CLOSING) { throw new SystemException() ; } else if (state != State.STATE_ENDED) { throw new WrongStateException() ; } }