/** * 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); } }
/** * 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); } }
/** * 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()); }
/** * 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()); }
/** * 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()); }
/** * 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()); }
/** * 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()); }
public synchronized void participantRolledBack (String participantId) throws InvalidParticipantException, WrongStateException, SystemException { if (participantId == null) throw new SystemException( wscfLogger.i18NLogger.get_model_twophase_arjunacore_ATCoordinator_2()); if (status() == ActionStatus.RUNNING) changeParticipantStatus(participantId, ROLLEDBACK); else throw new WrongStateException(); }
public synchronized void participantRolledBack (String participantId) throws InvalidParticipantException, WrongStateException, SystemException { if (participantId == null) throw new SystemException( wscfLogger.i18NLogger.get_model_twophase_arjunacore_ATCoordinator_2()); if (status() == ActionStatus.RUNNING) changeParticipantStatus(participantId, ROLLEDBACK); else 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); } }
/** * 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 close () throws InvalidParticipantException, WrongStateException, SystemException { try { if (_resource != null) { _resource.close(); } else throw new InvalidParticipantException(); } catch (com.arjuna.wst.WrongStateException ex) { throw new WrongStateException(ex.toString()); } catch (com.arjuna.wst.SystemException ex) { throw new SystemException(ex.toString()); } }
public void close () throws InvalidParticipantException, WrongStateException, SystemException { try { if (_resource != null) { _resource.close(); } else throw new InvalidParticipantException(); } catch (com.arjuna.wst.WrongStateException ex) { throw new WrongStateException(ex.toString()); } catch (com.arjuna.wst.SystemException ex) { throw new SystemException(ex.toString()); } }
public void close () throws InvalidParticipantException, WrongStateException, SystemException { try { if (_resource != null) { _resource.close(); } else throw new InvalidParticipantException(); } catch (com.arjuna.wst.WrongStateException ex) { throw new WrongStateException(ex.toString()); } catch (com.arjuna.wst.SystemException ex) { throw new SystemException(ex.toString()); } }
public synchronized void participantCompleted (String participantId) throws InvalidParticipantException, WrongStateException, SystemException { if (participantId == null) throw new SystemException( wscfLogger.i18NLogger.get_model_sagas_arjunacore_BACoordinator_2()); int status = status(); // completed is only legitimate when the TX is in these states switch (status) { case ActionStatus.ABORTED: break; case ActionStatus.RUNNING: case ActionStatus.ABORT_ONLY: changeParticipantStatus(participantId, COMPLETED); break; default: throw new WrongStateException( wscfLogger.i18NLogger.get_model_sagas_arjunacore_BACoordinator_3()); } }
public synchronized void participantCompleted (String participantId) throws InvalidParticipantException, WrongStateException, SystemException { if (participantId == null) throw new SystemException( wscfLogger.i18NLogger.get_model_sagas_arjunacore_BACoordinator_2()); int status = status(); // completed is only legitimate when the TX is in these states switch (status) { case ActionStatus.ABORTED: break; case ActionStatus.RUNNING: case ActionStatus.ABORT_ONLY: changeParticipantStatus(participantId, COMPLETED); break; default: throw new WrongStateException( wscfLogger.i18NLogger.get_model_sagas_arjunacore_BACoordinator_3()); } }
public void complete () throws InvalidParticipantException, WrongStateException, SystemException { if (_resource != null) { try { ((BusinessAgreementWithCoordinatorCompletionParticipant) _resource) .complete(); } catch (com.arjuna.wst.WrongStateException ex) { throw new WrongStateException(ex.toString()); } catch (com.arjuna.wst.SystemException ex) { throw new SystemException(ex.toString()); } } else throw new InvalidParticipantException(); } }
public void complete () throws InvalidParticipantException, WrongStateException, SystemException { if (_resource != null) { try { ((BusinessAgreementWithCoordinatorCompletionParticipant) _resource) .complete(); } catch (com.arjuna.wst.WrongStateException ex) { throw new WrongStateException(ex.toString()); } catch (com.arjuna.wst.SystemException ex) { throw new SystemException(ex.toString()); } } else throw new InvalidParticipantException(); } }
public synchronized void participantCannotComplete (String participantId) throws InvalidParticipantException, WrongStateException, SystemException { if (participantId == null) throw new SystemException( wscfLogger.i18NLogger.get_model_sagas_arjunacore_BACoordinator_2()); int status = status(); // cannot complete is only legitimate when the TX is in these states switch (status) { case ActionStatus.RUNNING: // if a participant notifies this then we need to mark the transaction as abort only preventCommit(); // !!! deliberate drop through !!! case ActionStatus.ABORT_ONLY: changeParticipantStatus(participantId, DELISTED); break; default: throw new WrongStateException( wscfLogger.i18NLogger.get_model_sagas_arjunacore_BACoordinator_3()); } }
public synchronized void participantCannotComplete (String participantId) throws InvalidParticipantException, WrongStateException, SystemException { if (participantId == null) throw new SystemException( wscfLogger.i18NLogger.get_model_sagas_arjunacore_BACoordinator_2()); int status = status(); // cannot complete is only legitimate when the TX is in these states switch (status) { case ActionStatus.RUNNING: // if a participant notifies this then we need to mark the transaction as abort only preventCommit(); // !!! deliberate drop through !!! case ActionStatus.ABORT_ONLY: changeParticipantStatus(participantId, DELISTED); break; default: throw new WrongStateException( wscfLogger.i18NLogger.get_model_sagas_arjunacore_BACoordinator_3()); } }