/** * Check whether the specified completion status is compatible with the one * currently assigned to the activity. * * @param CompletionStatus * cs The completion status to check. * * @exception WrongStateException * Thrown if the specified status is incompatible with that * currently possessed by this activity. * */ public final void completionValid (CompletionStatus cs) throws WrongStateException { if (!_completionStatus.equals(cs)) { if (_completionStatus.equals(FailureOnly.instance())) throw new WrongStateException( wsasLogger.i18NLogger.get_activity_ActivityImple_5() + " " + _completionStatus + " " + cs); } }
public void error () throws SystemException { try { _coordManager.setCancelOnly(); } catch (com.arjuna.mw.wsas.exceptions.WrongStateException ex) { throw new SystemException(ex.toString()); } catch (com.arjuna.mw.wsas.exceptions.SystemException ex) { throw new SystemException(ex.toString()); } }
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(); } }
/** * Check whether the specified completion status is compatible with the one * currently assigned to the activity. * * @param CompletionStatus * cs The completion status to check. * * @exception WrongStateException * Thrown if the specified status is incompatible with that * currently possessed by this activity. * */ public final void completionValid (CompletionStatus cs) throws WrongStateException { if (!_completionStatus.equals(cs)) { if (_completionStatus.equals(FailureOnly.instance())) throw new WrongStateException( wsasLogger.i18NLogger.get_activity_ActivityImple_5() + " " + _completionStatus + " " + cs); } }
public void error () throws SystemException { try { _coordManager.setCancelOnly(); } catch (com.arjuna.mw.wsas.exceptions.WrongStateException ex) { throw new SystemException(ex.toString()); } catch (com.arjuna.mw.wsas.exceptions.SystemException ex) { throw new SystemException(ex.toString()); } }
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(); } }
/** * Remove the specified synchronization from the coordinator's list. * * @exception InvalidSynchronizationException * Thrown if the participant is not known of by the * coordinator. * @exception WrongStateException * Thrown if the state of the coordinator does not allow the * participant to be removed (e.g., in a two-phase protocol * the coordinator is committing.) * @exception SystemException * Thrown if any other error occurs. */ public void delistSynchronization (Synchronization act) throws InvalidSynchronizationException, WrongStateException, SystemException { if (act == null) throw new InvalidSynchronizationException(); else throw new WrongStateException( wscfLogger.i18NLogger.get_model_sagas_arjunacore_BACoordinator_4()); }
public void error () throws SystemException { try { _coordManager.setCancelOnly(); } catch (com.arjuna.mw.wsas.exceptions.WrongStateException ex) { throw new SystemException(ex.toString()); } catch (com.arjuna.mw.wsas.exceptions.SystemException ex) { throw new SystemException(ex.toString()); } }
/** * Remove the specified synchronization from the coordinator's list. * * @exception InvalidSynchronizationException * Thrown if the participant is not known of by the * coordinator. * @exception WrongStateException * Thrown if the state of the coordinator does not allow the * participant to be removed (e.g., in a two-phase protocol * the coordinator is committing.) * @exception SystemException * Thrown if any other error occurs. */ public void delistSynchronization (Synchronization act) throws InvalidSynchronizationException, WrongStateException, SystemException { if (act == null) throw new InvalidSynchronizationException(); else throw new WrongStateException( wscfLogger.i18NLogger.get_model_twophase_arjunacore_ATCoordinator_1()); }
throw new SystemException(ex.toString());
/** * Remove the specified participant from the coordinator's list. * * @exception InvalidParticipantException * Thrown if the participant is not known of by the * coordinator. * @exception WrongStateException * Thrown if the state of the coordinator does not allow the * participant to be removed (e.g., in a two-phase protocol * the coordinator is committing.) * @exception SystemException * Thrown if any other error occurs. */ public void delistParticipant (Participant act) throws InvalidParticipantException, WrongStateException, SystemException { if (act == null) throw new InvalidParticipantException(); else throw new WrongStateException( wscfLogger.i18NLogger.get_model_twophase_arjunacore_ATCoordinator_1()); }
throw new SystemException(ex.toString());
/** * Remove the specified participant from the coordinator's list. * * @exception InvalidParticipantException * Thrown if the participant is not known of by the * coordinator. * @exception WrongStateException * Thrown if the state of the coordinator does not allow the * participant to be removed (e.g., in a two-phase protocol * the coordinator is committing.) * @exception SystemException * Thrown if any other error occurs. */ public void delistParticipant (Participant act) throws InvalidParticipantException, WrongStateException, SystemException { if (act == null) throw new InvalidParticipantException(); else throw new WrongStateException( wscfLogger.i18NLogger.get_model_twophase_arjunacore_ATCoordinator_1()); }