Search in sources :

Example 1 with BusinessActivityTerminatorStub

use of com.arjuna.wst11.stub.BusinessActivityTerminatorStub in project narayana by jbosstm.

the class UserBusinessActivityImple 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 terminatorCoordinator = getTerminationCoordinator(ctx);
        BusinessActivityTerminatorStub terminatorStub = new BusinessActivityTerminatorStub(id, terminatorCoordinator);
        terminatorStub.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 : 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) BusinessActivityTerminatorStub(com.arjuna.wst11.stub.BusinessActivityTerminatorStub) 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 2 with BusinessActivityTerminatorStub

use of com.arjuna.wst11.stub.BusinessActivityTerminatorStub in project narayana by jbosstm.

the class UserBusinessActivityImple 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 terminatorCoordinator = getTerminationCoordinator(ctx);
        BusinessActivityTerminatorStub terminatorStub = new BusinessActivityTerminatorStub(id, terminatorCoordinator);
        terminatorStub.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 : 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) BusinessActivityTerminatorStub(com.arjuna.wst11.stub.BusinessActivityTerminatorStub) 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 3 with BusinessActivityTerminatorStub

use of com.arjuna.wst11.stub.BusinessActivityTerminatorStub in project narayana by jbosstm.

the class UserBusinessActivityImple 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 terminatorCoordinator = getTerminationCoordinator(ctx);
        BusinessActivityTerminatorStub terminatorStub = new BusinessActivityTerminatorStub(id, terminatorCoordinator);
        terminatorStub.complete();
    } catch (SystemException ex) {
        throw ex;
    } catch (UnknownTransactionException ex) {
        throw ex;
    } catch (WrongStateException ex) {
        throw ex;
    } catch (Exception ex) {
        throw new SystemException(ex.toString());
    }
}
Also used : 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) BusinessActivityTerminatorStub(com.arjuna.wst11.stub.BusinessActivityTerminatorStub) 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

TxContextImple (com.arjuna.mwlabs.wst11.ba.context.TxContextImple)3 InvalidCreateParametersException (com.arjuna.wsc.InvalidCreateParametersException)3 SystemException (com.arjuna.wst.SystemException)3 TransactionRolledBackException (com.arjuna.wst.TransactionRolledBackException)3 UnknownTransactionException (com.arjuna.wst.UnknownTransactionException)3 WrongStateException (com.arjuna.wst.WrongStateException)3 BusinessActivityTerminatorStub (com.arjuna.wst11.stub.BusinessActivityTerminatorStub)3 W3CEndpointReference (javax.xml.ws.wsaddressing.W3CEndpointReference)3