Search in sources :

Example 1 with CoordinatorServiceImple

use of com.arjuna.mwlabs.wscf.model.twophase.arjunacore.CoordinatorServiceImple in project narayana by jbosstm.

the class ContextFactoryImple method createSubordinate.

public final Object createSubordinate(String subordinateType) throws NoActivityException, InvalidProtocolException, SystemException {
    try {
        CoordinatorServiceImple coordManager = (CoordinatorServiceImple) _coordManager;
        CoordinatorControl theControl = coordManager.coordinatorControl();
        ATCoordinator subordinateTransaction = theControl.createSubordinate(subordinateType);
        /*
			 * Now add the registrar for this specific coordinator to the
			 * mapper.
			 */
        subordinateTransaction.enlistSynchronization(new CleanupSynchronization(subordinateTransaction.get_uid().stringForm(), _theRegistrar));
        _theRegistrar.associate(subordinateTransaction);
        return subordinateTransaction;
    } catch (Exception ex) {
        throw new SystemException(ex.toString());
    }
}
Also used : CleanupSynchronization(com.arjuna.mwlabs.wst11.at.participants.CleanupSynchronization) SystemException(com.arjuna.mw.wsas.exceptions.SystemException) SubordinateATCoordinator(com.arjuna.mwlabs.wscf.model.twophase.arjunacore.subordinate.SubordinateATCoordinator) ATCoordinator(com.arjuna.mwlabs.wscf.model.twophase.arjunacore.ATCoordinator) CoordinatorServiceImple(com.arjuna.mwlabs.wscf.model.twophase.arjunacore.CoordinatorServiceImple) CoordinatorControl(com.arjuna.mwlabs.wscf.model.twophase.arjunacore.CoordinatorControl) InvalidProtocolException(com.arjuna.wsc.InvalidProtocolException) InvalidCreateParametersException(com.arjuna.wsc.InvalidCreateParametersException) SystemException(com.arjuna.mw.wsas.exceptions.SystemException) NoActivityException(com.arjuna.mw.wsas.exceptions.NoActivityException)

Aggregations

NoActivityException (com.arjuna.mw.wsas.exceptions.NoActivityException)1 SystemException (com.arjuna.mw.wsas.exceptions.SystemException)1 ATCoordinator (com.arjuna.mwlabs.wscf.model.twophase.arjunacore.ATCoordinator)1 CoordinatorControl (com.arjuna.mwlabs.wscf.model.twophase.arjunacore.CoordinatorControl)1 CoordinatorServiceImple (com.arjuna.mwlabs.wscf.model.twophase.arjunacore.CoordinatorServiceImple)1 SubordinateATCoordinator (com.arjuna.mwlabs.wscf.model.twophase.arjunacore.subordinate.SubordinateATCoordinator)1 CleanupSynchronization (com.arjuna.mwlabs.wst11.at.participants.CleanupSynchronization)1 InvalidCreateParametersException (com.arjuna.wsc.InvalidCreateParametersException)1 InvalidProtocolException (com.arjuna.wsc.InvalidProtocolException)1