use of com.arjuna.wst11.stub.BusinessActivityTerminatorRPCStub in project narayana by jbosstm.
the class UserBusinessActivityStandaloneImple method complete.
public void complete() throws UnknownTransactionException, SystemException, WrongStateException {
try {
final TxContextImple ctx = ((TxContextImple) _ctxManager.currentTransaction());
if (ctx == null) {
throw new WrongStateException();
}
final String id = ctx.identifier();
final W3CEndpointReference terminatorCoordinatorRPC = getTerminationCoordinatorRPC(ctx);
BusinessActivityTerminatorRPCStub terminatorRPCStub = new BusinessActivityTerminatorRPCStub(id, terminatorCoordinatorRPC);
terminatorRPCStub.complete();
} catch (SystemException ex) {
throw ex;
} catch (UnknownTransactionException ex) {
throw ex;
} catch (WrongStateException ex) {
throw ex;
} catch (Exception ex) {
throw new SystemException(ex.toString());
}
}
use of com.arjuna.wst11.stub.BusinessActivityTerminatorRPCStub in project narayana by jbosstm.
the class UserBusinessActivityStandaloneImple method cancel.
public void cancel() throws UnknownTransactionException, SystemException, WrongStateException {
TxContextImple ctx = null;
try {
ctx = (TxContextImple) _ctxManager.suspend();
if (ctx == null) {
throw new WrongStateException();
}
final String id = ctx.identifier();
final W3CEndpointReference terminatorCoordinatorRPC = getTerminationCoordinatorRPC(ctx);
BusinessActivityTerminatorRPCStub terminatorRPCStub = new BusinessActivityTerminatorRPCStub(id, terminatorCoordinatorRPC);
terminatorRPCStub.cancel();
} catch (SystemException ex) {
throw ex;
} catch (WrongStateException ex) {
throw ex;
} catch (UnknownTransactionException ex) {
throw ex;
} catch (Exception ex) {
ex.printStackTrace();
throw new SystemException(ex.toString());
} finally {
tidyup();
}
}
use of com.arjuna.wst11.stub.BusinessActivityTerminatorRPCStub in project narayana by jbosstm.
the class UserBusinessActivityStandaloneImple method close.
public void close() throws TransactionRolledBackException, UnknownTransactionException, SystemException, WrongStateException {
TxContextImple ctx = null;
try {
ctx = (TxContextImple) _ctxManager.suspend();
if (ctx == null) {
throw new WrongStateException();
}
final String id = ctx.identifier();
final W3CEndpointReference terminatorCoordinatorRPC = getTerminationCoordinatorRPC(ctx);
BusinessActivityTerminatorRPCStub terminatorRPCStub = new BusinessActivityTerminatorRPCStub(id, terminatorCoordinatorRPC);
terminatorRPCStub.close();
} catch (SystemException ex) {
throw ex;
} catch (TransactionRolledBackException ex) {
throw ex;
} catch (WrongStateException ex) {
throw ex;
} catch (UnknownTransactionException ex) {
throw ex;
} catch (Exception ex) {
ex.printStackTrace();
throw new SystemException(ex.toString());
} finally {
tidyup();
}
}
Aggregations