Search in sources :

Example 1 with CoordinatorServiceImple

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

the class ContextFactoryImple method createSubordinate.

public final Object createSubordinate() throws NoActivityException, InvalidProtocolException, SystemException {
    try {
        CoordinatorServiceImple coordManager = (CoordinatorServiceImple) _coordManager;
        BACoordinator subordinateTransaction = coordManager.createSubordinate();
        /*
             * 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.ba.participants.CleanupSynchronization) SystemException(com.arjuna.mw.wsas.exceptions.SystemException) CoordinatorServiceImple(com.arjuna.mwlabs.wscf.model.sagas.arjunacore.CoordinatorServiceImple) BACoordinator(com.arjuna.mwlabs.wscf.model.sagas.arjunacore.BACoordinator) SubordinateBACoordinator(com.arjuna.mwlabs.wscf.model.sagas.arjunacore.subordinate.SubordinateBACoordinator) 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 BACoordinator (com.arjuna.mwlabs.wscf.model.sagas.arjunacore.BACoordinator)1 CoordinatorServiceImple (com.arjuna.mwlabs.wscf.model.sagas.arjunacore.CoordinatorServiceImple)1 SubordinateBACoordinator (com.arjuna.mwlabs.wscf.model.sagas.arjunacore.subordinate.SubordinateBACoordinator)1 CleanupSynchronization (com.arjuna.mwlabs.wst11.ba.participants.CleanupSynchronization)1 InvalidCreateParametersException (com.arjuna.wsc.InvalidCreateParametersException)1 InvalidProtocolException (com.arjuna.wsc.InvalidProtocolException)1