use of com.arjuna.mw.wsas.exceptions.SystemException in project narayana by jbosstm.
the class CoordinatorControl method createSubordinate.
/**
* Create a subordinate transaction, i.e., one which can be driven
* through complete, close and cancel. Such a transaction is not
* interposed with any parent transaction because the parent may
* be physically remote from the child. Such interposition is the
* responsibility of the invoker.
*
* @return the subordinate transaction. The transaction is not
* associated with the thread and is not interposed. It is running.
*
* @throws SystemException throw if any error occurs.
*/
public final BACoordinator createSubordinate() throws SystemException {
try {
SubordinateBACoordinator coord = new SubordinateBACoordinator();
int status = coord.start(null);
if (status != ActionStatus.RUNNING) {
throw new BegunFailedException(wscfLogger.i18NLogger.get_model_sagas_arjunacore_CoordinatorControl_1() + ActionStatus.stringForm(status));
} else {
return coord;
}
} catch (SystemException ex) {
throw ex;
} catch (Exception ex) {
throw new UnexpectedException(ex.toString());
}
}
use of com.arjuna.mw.wsas.exceptions.SystemException in project narayana by jbosstm.
the class CoordinatorControl method parentCoordinator.
private final ATCoordinator parentCoordinator() throws SystemException {
try {
ActivityHierarchy hier = UserActivityFactory.userActivity().currentActivity();
ActivityHandleImple parentActivity = null;
ATCoordinator parentCoordinator = null;
if (hier.size() > 1) {
parentActivity = (ActivityHandleImple) hier.activity(hier.size() - 2);
parentCoordinator = (ATCoordinator) _coordinators.get(parentActivity);
}
return parentCoordinator;
} catch (Exception ex) {
ex.printStackTrace();
return null;
}
}
Aggregations