public void complete() throws WrongStateException, SystemException { if (!recovered) { // the coordinator will send complete to all participants and then // also run phase one commit. the former may throw an exception. // if the latter succeeds the tx state will be COMMITTING whereas // if it fails it will be ABORTED. try { coordinator.complete(); } catch (com.arjuna.mw.wsas.exceptions.WrongStateException wse) { throw new WrongStateException(wse.getMessage()); } catch (com.arjuna.mw.wsas.exceptions.SystemException se) { throw new SystemException(se.getMessage()); } // if status is COMMITTING then we return allowing the participant to be logged // if status is ABORTED then the participant must fail avoiding any logging if (coordinator.status() == ActionStatus.ABORTED) { manager.fail(BusinessActivityConstants.WSBA_ELEMENT_FAIL_QNAME); } else { // null out the manager so we don't attempt to save it to the log manager = null; } } else { // we should never get asked to complete a recovered activity throw new WrongStateException(); } }
public void complete() throws WrongStateException, SystemException { if (!recovered) { // the coordinator will send complete to all participants and then // also run phase one commit. the former may throw an exception. // if the latter succeeds the tx state will be COMMITTING whereas // if it fails it will be ABORTED. try { coordinator.complete(); } catch (com.arjuna.mw.wsas.exceptions.WrongStateException wse) { throw new WrongStateException(wse.getMessage()); } catch (com.arjuna.mw.wsas.exceptions.SystemException se) { throw new SystemException(se.getMessage()); } // if status is COMMITTING then we return allowing the participant to be logged // if status is ABORTED then the participant must fail avoiding any logging if (coordinator.status() == ActionStatus.ABORTED) { manager.fail(BusinessActivityConstants.WSBA_ELEMENT_FAIL_QNAME); } else { // null out the manager so we don't attempt to save it to the log manager = null; } } else { // we should never get asked to complete a recovered activity throw new WrongStateException(); } }
public void complete() throws WrongStateException, SystemException { if (!recovered) { // the coordinator will send complete to all participants and then // also run phase one commit. the former may throw an exception. // if the latter succeeds the tx state will be COMMITTING whereas // if it fails it will be ABORTED. try { coordinator.complete(); } catch (com.arjuna.mw.wsas.exceptions.WrongStateException wse) { throw new WrongStateException(wse.getMessage()); } catch (com.arjuna.mw.wsas.exceptions.SystemException se) { throw new SystemException(se.getMessage()); } // if status is COMMITTING then we return allowing the participant to be logged // if status is ABORTED then the participant must fail avoiding any logging if (coordinator.status() == ActionStatus.ABORTED) { manager.fail(BusinessActivityConstants.WSBA_ELEMENT_FAIL_QNAME); } else { // null out the manager so we don't attempt to save it to the log manager = null; } } else { // we should never get asked to complete a recovered activity throw new WrongStateException(); } }