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());
}
}
Aggregations