List<String> protocolImplementations = wscfEnvironmentBean.getProtocolImplementations(); if (protocolImplementations == null) { wscfLogger.i18NLogger.info_protocols_ProtocolManager_1(); return; hlsProviderClasses.add(clazz); } else { wscfLogger.i18NLogger.error_protocols_ProtocolManager_2(className); wscfLogger.i18NLogger.error_protocols_ProtocolManager_3(className, cnfe); wscfLogger.i18NLogger.info_protocols_ProtocolManager_4(className, serviceType); Object object = clazz.newInstance(); _protocols.put(serviceType, object); } catch (InstantiationException ie) { wscfLogger.i18NLogger.error_protocols_ProtocolManager_5(className, ie); } catch (IllegalAccessException iae) { wscfLogger.i18NLogger.error_protocols_ProtocolManager_5(className, iae); if (contextProvider != null) { String coordinationType = contextProvider.coordinationType(); wscfLogger.i18NLogger.info_protocols_ProtocolManager_4(className, coordinationType); Object object = clazz.newInstance(); _protocols.put(coordinationType, object); wscfLogger.i18NLogger.error_protocols_ProtocolManager_5(className, ie); wscfLogger.i18NLogger.error_protocols_ProtocolManager_5(className, iae);
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()); } }
/** * 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 synchronized void participantReadOnly (String participantId) throws InvalidParticipantException, SystemException { if (participantId == null) throw new SystemException( wscfLogger.i18NLogger.get_model_twophase_arjunacore_ATCoordinator_2()); if (status() == ActionStatus.RUNNING) { changeParticipantStatus(participantId, READONLY); } else throw new SystemException( wscfLogger.i18NLogger.get_model_twophase_arjunacore_ATCoordinator_3()); }
/** * 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()); }
/** * 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()); } }
throw new ProtocolViolationException(wscfLogger.i18NLogger.get_model_sagas_arjunacore_CoordinatorServiceImple_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 participantReadOnly (String participantId) throws InvalidParticipantException, SystemException { if (participantId == null) throw new SystemException( wscfLogger.i18NLogger.get_model_twophase_arjunacore_ATCoordinator_2()); if (status() == ActionStatus.RUNNING) { changeParticipantStatus(participantId, READONLY); } else throw new SystemException( wscfLogger.i18NLogger.get_model_twophase_arjunacore_ATCoordinator_3()); }
/** * 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()); }
/** * 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()); } }
throw new ProtocolViolationException(wscfLogger.i18NLogger.get_model_sagas_arjunacore_CoordinatorServiceImple_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(); }
List<String> protocolImplementations = wscfEnvironmentBean.getProtocolImplementations(); if (protocolImplementations == null) { wscfLogger.i18NLogger.info_protocols_ProtocolManager_1(); return; hlsProviderClasses.add(clazz); } else { wscfLogger.i18NLogger.error_protocols_ProtocolManager_2(className); wscfLogger.i18NLogger.error_protocols_ProtocolManager_3(className, cnfe); wscfLogger.i18NLogger.info_protocols_ProtocolManager_4(className, serviceType); Object object = clazz.newInstance(); _protocols.put(serviceType, object); } catch (InstantiationException ie) { wscfLogger.i18NLogger.error_protocols_ProtocolManager_5(className, ie); } catch (IllegalAccessException iae) { wscfLogger.i18NLogger.error_protocols_ProtocolManager_5(className, iae); if (contextProvider != null) { String coordinationType = contextProvider.coordinationType(); wscfLogger.i18NLogger.info_protocols_ProtocolManager_4(className, coordinationType); Object object = clazz.newInstance(); _protocols.put(coordinationType, object); wscfLogger.i18NLogger.error_protocols_ProtocolManager_5(className, ie); wscfLogger.i18NLogger.error_protocols_ProtocolManager_5(className, iae);
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()); } }
/** * 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()); }
wscfLogger.i18NLogger.get_model_sagas_arjunacore_CoordinatorControl_1() + ActionStatus.stringForm(status));
throw new ProtocolViolationException(wscfLogger.i18NLogger.get_model_sagas_arjunacore_CoordinatorServiceImple_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_sagas_arjunacore_BACoordinator_4()); }
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()); } }