Search in sources :

Example 31 with TxContextImple

use of com.arjuna.mwlabs.wst11.ba.context.TxContextImple 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();
    }
}
Also used : BusinessActivityTerminatorRPCStub(com.arjuna.wst11.stub.BusinessActivityTerminatorRPCStub) SystemException(com.arjuna.wst.SystemException) UnknownTransactionException(com.arjuna.wst.UnknownTransactionException) WrongStateException(com.arjuna.wst.WrongStateException) W3CEndpointReference(javax.xml.ws.wsaddressing.W3CEndpointReference) TxContextImple(com.arjuna.mwlabs.wst11.ba.context.TxContextImple) UnknownTransactionException(com.arjuna.wst.UnknownTransactionException) WrongStateException(com.arjuna.wst.WrongStateException) SystemException(com.arjuna.wst.SystemException) InvalidCreateParametersException(com.arjuna.wsc.InvalidCreateParametersException) TransactionRolledBackException(com.arjuna.wst.TransactionRolledBackException)

Example 32 with TxContextImple

use of com.arjuna.mwlabs.wst11.ba.context.TxContextImple 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();
    }
}
Also used : BusinessActivityTerminatorRPCStub(com.arjuna.wst11.stub.BusinessActivityTerminatorRPCStub) SystemException(com.arjuna.wst.SystemException) UnknownTransactionException(com.arjuna.wst.UnknownTransactionException) WrongStateException(com.arjuna.wst.WrongStateException) W3CEndpointReference(javax.xml.ws.wsaddressing.W3CEndpointReference) TransactionRolledBackException(com.arjuna.wst.TransactionRolledBackException) TxContextImple(com.arjuna.mwlabs.wst11.ba.context.TxContextImple) UnknownTransactionException(com.arjuna.wst.UnknownTransactionException) WrongStateException(com.arjuna.wst.WrongStateException) SystemException(com.arjuna.wst.SystemException) InvalidCreateParametersException(com.arjuna.wsc.InvalidCreateParametersException) TransactionRolledBackException(com.arjuna.wst.TransactionRolledBackException)

Aggregations

InvalidCreateParametersException (com.arjuna.wsc.InvalidCreateParametersException)22 SystemException (com.arjuna.wst.SystemException)22 UnknownTransactionException (com.arjuna.wst.UnknownTransactionException)22 WrongStateException (com.arjuna.wst.WrongStateException)22 TxContextImple (com.arjuna.mwlabs.wst11.at.context.TxContextImple)17 TxContextImple (com.arjuna.mwlabs.wst11.ba.context.TxContextImple)15 TransactionRolledBackException (com.arjuna.wst.TransactionRolledBackException)14 W3CEndpointReference (javax.xml.ws.wsaddressing.W3CEndpointReference)14 CoordinationContext (org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContext)12 TxContext (com.arjuna.mw.wst.TxContext)9 CoordinationContextType (org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType)9 Context (com.arjuna.mw.wsc11.context.Context)7 CannotRegisterException (com.arjuna.wsc.CannotRegisterException)7 SoapFault (com.arjuna.webservices.SoapFault)6 InvalidProtocolException (com.arjuna.wsc.InvalidProtocolException)4 InvalidStateException (com.arjuna.wsc.InvalidStateException)4 BusinessActivityTerminatorRPCStub (com.arjuna.wst11.stub.BusinessActivityTerminatorRPCStub)3 BusinessActivityTerminatorStub (com.arjuna.wst11.stub.BusinessActivityTerminatorStub)3 ContextImple (com.arjuna.mwlabs.wst11.at.ContextImple)2 ContextImple (com.arjuna.mwlabs.wst11.ba.ContextImple)2