public final BACoordinator currentCoordinator () throws NoCoordinatorException, SystemException { BACoordinator coord = (BACoordinator) _coordinators.get(currentActivity()); if (coord == null) throw new NoCoordinatorException(); else return coord; }
/** * @param protocolName The name of the protocol. * * @exception com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException * Thrown if the requested coordination protocol has not been * registered. * @exception IllegalArgumentException * Thrown if the parameter is invalid. * * @return The class that implements the specified coordination protocol. * */ public Object getProtocolImplementation (String protocolName) throws ProtocolNotRegisteredException, IllegalArgumentException { synchronized (this) { if (protocolName == null) { throw new IllegalArgumentException(); } Object object = _protocols.get(protocolName); if (object == null) { throw new ProtocolNotRegisteredException(wscfLogger.i18NLogger.get_mw_wscf11_protocols_ProtocolManager_1() + protocolName); } return object; } }
/** * 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 BegunFailedException( wscfLogger.i18NLogger.get_model_sagas_arjunacore_CoordinatorControl_1() + ActionStatus.stringForm(status)); throw new UnexpectedException(ex.toString());
throw new BegunFailedException( wscfLogger.i18NLogger.get_model_twophase_arjunacore_CoordinatorControl_1() + ActionStatus.stringForm(status)); throw new UnexpectedException(ex.toString());
public final ATCoordinator currentCoordinator () throws NoCoordinatorException, SystemException { ATCoordinator coord = (ATCoordinator) _coordinators.get(currentActivity()); if (coord == null) throw new NoCoordinatorException(); else return coord; }
/** * 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()); }
/** * @param protocolName The name of the protocol. * * @exception com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException * Thrown if the requested coordination protocol has not been * registered. * @exception IllegalArgumentException * Thrown if the parameter is invalid. * * @return The class that implements the specified coordination protocol. * */ public Object getProtocolImplementation (String protocolName) throws ProtocolNotRegisteredException, IllegalArgumentException { synchronized (this) { if (protocolName == null) { throw new IllegalArgumentException(); } Object object = _protocols.get(protocolName); if (object == null) { throw new ProtocolNotRegisteredException(wscfLogger.i18NLogger.get_mw_wscf11_protocols_ProtocolManager_1() + protocolName); } return object; } }
throw new BegunFailedException( wscfLogger.i18NLogger.get_model_sagas_arjunacore_CoordinatorControl_1() + ActionStatus.stringForm(status)); throw new UnexpectedException(ex.toString());
public final ATCoordinator currentCoordinator () throws NoCoordinatorException, SystemException { ATCoordinator coord = (ATCoordinator) _coordinators.get(currentActivity()); if (coord == null) throw new NoCoordinatorException(); else return coord; }
throw new BegunFailedException( wscfLogger.i18NLogger.get_model_twophase_arjunacore_CoordinatorControl_1() + ActionStatus.stringForm(status)); throw new UnexpectedException(ex.toString());
public final BACoordinator currentCoordinator () throws NoCoordinatorException, SystemException { BACoordinator coord = (BACoordinator) _coordinators.get(currentActivity()); if (coord == null) throw new NoCoordinatorException(); else return coord; }
/** * An activity has begun and is active on the current thread. */ public void begin () throws SystemException { try { BACoordinator coord = new BACoordinator(); int status = coord.start(parentCoordinator()); if (status != ActionStatus.RUNNING) throw new BegunFailedException(wscfLogger.i18NLogger.get_model_sagas_arjunacore_CoordinatorControl_1() + ActionStatus.stringForm(status)); else { _coordinators.put(currentActivity(), coord); } } catch (SystemException ex) { throw ex; } catch (Exception ex) { throw new UnexpectedException(ex.toString()); } }
/** * Set the termination status for the current activity to cancel only. * * @exception WrongStateException Thrown if the completion status is * incompatible with the current state of the activity. * @exception SystemException Thrown if any other error occurs. */ public void setCancelOnly () throws NoCoordinatorException, WrongStateException, SystemException { try { UserActivityFactory.userActivity().setCompletionStatus(FailureOnly.instance()); } catch (NoActivityException ex) { throw new NoCoordinatorException(); } }
/** * An activity has begun and is active on the current thread. */ public void begin () throws SystemException { try { ATCoordinator coord = new ATCoordinator(); int status = coord.start(parentCoordinator()); if (status != ActionStatus.RUNNING) throw new BegunFailedException( wscfLogger.i18NLogger.get_model_twophase_arjunacore_CoordinatorControl_1() + ActionStatus.stringForm(status)); else { _coordinators.put(currentActivity(), coord); } } catch (SystemException ex) { throw ex; } catch (Exception ex) { throw new UnexpectedException(ex.toString()); } }
/** * Set the termination status for the current activity to cancel only. * * @exception WrongStateException Thrown if the completion status is * incompatible with the current state of the activity. * @exception SystemException Thrown if any other error occurs. */ public void setCancelOnly () throws NoCoordinatorException, WrongStateException, SystemException { try { UserActivityFactory.userActivity().setCompletionStatus(FailureOnly.instance()); } catch (NoActivityException ex) { throw new NoCoordinatorException(); } }
/** * An activity has begun and is active on the current thread. */ public void begin () throws SystemException { try { BACoordinator coord = new BACoordinator(); int status = coord.start(parentCoordinator()); if (status != ActionStatus.RUNNING) throw new BegunFailedException(wscfLogger.i18NLogger.get_model_sagas_arjunacore_CoordinatorControl_1() + ActionStatus.stringForm(status)); else { _coordinators.put(currentActivity(), coord); } } catch (SystemException ex) { throw ex; } catch (Exception ex) { throw new UnexpectedException(ex.toString()); } }
/** * Set the termination status for the current activity to cancel only. * * @exception WrongStateException * Thrown if the completion status is incompatible with the * current state of the activity. * @exception SystemException * Thrown if any other error occurs. */ public void setCancelOnly () throws NoCoordinatorException, WrongStateException, SystemException { try { UserActivityFactory.userActivity().setCompletionStatus(FailureOnly.instance()); } catch (NoActivityException ex) { throw new NoCoordinatorException(); } }
/** * An activity has begun and is active on the current thread. */ public void begin () throws SystemException { try { ATCoordinator coord = new ATCoordinator(); int status = coord.start(parentCoordinator()); if (status != ActionStatus.RUNNING) throw new BegunFailedException( wscfLogger.i18NLogger.get_model_twophase_arjunacore_CoordinatorControl_1() + ActionStatus.stringForm(status)); else { _coordinators.put(currentActivity(), coord); } } catch (SystemException ex) { throw ex; } catch (Exception ex) { throw new UnexpectedException(ex.toString()); } }
/** * Set the termination status for the current activity to cancel only. * * @exception WrongStateException * Thrown if the completion status is incompatible with the * current state of the activity. * @exception SystemException * Thrown if any other error occurs. */ public void setCancelOnly () throws NoCoordinatorException, WrongStateException, SystemException { try { UserActivityFactory.userActivity().setCompletionStatus(FailureOnly.instance()); } catch (NoActivityException ex) { throw new NoCoordinatorException(); } }