public void begin (int timeout) throws WrongStateException, SystemException { try { if (_ctxManager.currentTransaction() != null) throw new WrongStateException(); Context ctx = startTransaction(timeout, null); _ctxManager.resume(new TxContextImple(ctx)); } catch (InvalidCreateParametersException ex) { tidyup(); throw new SystemException(ex.toString()); } catch (UnknownTransactionException ex) { tidyup(); throw new SystemException(ex.toString()); } catch (SystemException ex) { tidyup(); throw ex; } }
public String toString () { return transactionIdentifier(); }
final W3CEndpointReference terminatorCoordinatorRPC = getTerminationCoordinatorRPC(ctx) ; tidyup();
/** * fetch the coordination context type stashed in the current BA context implememtation * and use it to construct an instance of the coordination context extension type we need to * send down the wire to the activation coordinator * @param current the current AT context implememtation * @return an instance of the coordination context extension type */ private CoordinationContext getContext(TxContextImple current) { CoordinationContextType contextType = getContextType(current); CoordinationContext context = new CoordinationContext(); context.setCoordinationType(contextType.getCoordinationType()); context.setExpires(contextType.getExpires()); context.setIdentifier(contextType.getIdentifier()); context.setRegistrationService(contextType.getRegistrationService()); return context; }
private final Context startTransaction (int timeout, TxContextImple current) throws InvalidCreateParametersException, SystemException { try { final Long expires = (timeout > 0 ? new Long(timeout) : null) ; final String messageId = MessageId.getMessageId() ; final CoordinationContext currentContext = (current != null ? getContext(current) : null); final CoordinationContextType coordinationContext = ActivationCoordinator.createCoordinationContext( _activationCoordinatorService, messageId, BusinessActivityConstants.WSBA_PROTOCOL_ATOMIC_OUTCOME, expires, currentContext) ; if (coordinationContext == null) { throw new SystemException( wstxLogger.i18NLogger.get_mwlabs_wst11_ba_remote_UserBusinessActivityImple_2()); } return new ContextImple(coordinationContext) ; } catch (final InvalidCreateParametersException icpe) { throw icpe ; } catch (final SoapFault sf) { throw new SystemException(sf.getMessage()) ; } catch (final Exception ex) { throw new SystemException(ex.toString()); } }
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()); } }
final W3CEndpointReference terminatorCoordinatorRPC = getTerminationCoordinatorRPC(ctx) ; tidyup();
/** * fetch the coordination context type stashed in the current BA context implememtation * and use it to construct an instance of the coordination context extension type we need to * send down the wire to the activation coordinator * @param current the current AT context implememtation * @return an instance of the coordination context extension type */ private CoordinationContext getContext(TxContextImple current) { CoordinationContextType contextType = getContextType(current); CoordinationContext context = new CoordinationContext(); context.setCoordinationType(contextType.getCoordinationType()); context.setExpires(contextType.getExpires()); context.setIdentifier(contextType.getIdentifier()); context.setRegistrationService(contextType.getRegistrationService()); return context; }
private final Context startTransaction (int timeout, TxContextImple current) throws InvalidCreateParametersException, SystemException { try { final Long expires = (timeout > 0 ? new Long(timeout) : null) ; final String messageId = MessageId.getMessageId() ; final CoordinationContext currentContext = (current != null ? getContext(current) : null); final CoordinationContextType coordinationContext = ActivationCoordinator.createCoordinationContext( _activationCoordinatorService, messageId, BusinessActivityConstants.WSBA_PROTOCOL_ATOMIC_OUTCOME, expires, currentContext) ; if (coordinationContext == null) { throw new SystemException( wstxLogger.i18NLogger.get_mwlabs_wst11_ba_remote_UserBusinessActivityImple_2()); } return new ContextImple(coordinationContext) ; } catch (final InvalidCreateParametersException icpe) { throw icpe ; } catch (final SoapFault sf) { throw new SystemException(sf.getMessage()) ; } catch (final Exception ex) { throw new SystemException(ex.toString()); } }
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()); } }
public void begin (int timeout) throws WrongStateException, SystemException { try { if (_ctxManager.currentTransaction() != null) throw new WrongStateException(); Context ctx = startTransaction(timeout, null); _ctxManager.resume(new TxContextImple(ctx)); } catch (InvalidCreateParametersException ex) { tidyup(); throw new SystemException(ex.toString()); } catch (UnknownTransactionException ex) { tidyup(); throw new SystemException(ex.toString()); } catch (SystemException ex) { tidyup(); throw ex; } }
final W3CEndpointReference terminatorCoordinatorRPC = getTerminationCoordinatorRPC(ctx) ; tidyup();
public String toString () { return transactionIdentifier(); }
/** * fetch the coordination context type stashed in the current BA context implememtation * and use it to construct an instance of the coordination context extension type we need to * send down the wire to the activation coordinator * @param current the current AT context implememtation * @return an instance of the coordination context extension type */ private CoordinationContext getContext(TxContextImple current) { CoordinationContextType contextType = getContextType(current); CoordinationContext context = new CoordinationContext(); context.setCoordinationType(contextType.getCoordinationType()); context.setExpires(contextType.getExpires()); context.setIdentifier(contextType.getIdentifier()); context.setRegistrationService(contextType.getRegistrationService()); return context; }
private final Context startTransaction (int timeout, TxContextImple current) throws InvalidCreateParametersException, SystemException { try { final Long expires = (timeout > 0 ? new Long(timeout) : null) ; final String messageId = MessageId.getMessageId() ; final CoordinationContext currentContext = (current != null ? getContext(current) : null); final CoordinationContextType coordinationContext = ActivationCoordinator.createCoordinationContext( _activationCoordinatorService, messageId, BusinessActivityConstants.WSBA_PROTOCOL_ATOMIC_OUTCOME, expires, currentContext) ; if (coordinationContext == null) { throw new SystemException( wstxLogger.i18NLogger.get_mwlabs_wst11_ba_remote_UserBusinessActivityImple_2()); } return new ContextImple(coordinationContext) ; } catch (final InvalidCreateParametersException icpe) { throw icpe ; } catch (final SoapFault sf) { throw new SystemException(sf.getMessage()) ; } catch (final Exception ex) { throw new SystemException(ex.toString()); } }
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()); } }
public void begin (int timeout) throws WrongStateException, SystemException { try { if (_ctxManager.currentTransaction() != null) throw new WrongStateException(); Context ctx = startTransaction(timeout, null); _ctxManager.resume(new TxContextImple(ctx)); } catch (InvalidCreateParametersException ex) { tidyup(); throw new SystemException(ex.toString()); } catch (UnknownTransactionException ex) { tidyup(); throw new SystemException(ex.toString()); } catch (SystemException ex) { tidyup(); throw ex; } }
final W3CEndpointReference terminatorCoordinatorRPC = getTerminationCoordinatorRPC(ctx) ; tidyup();
public String toString () { return transactionIdentifier(); }
final W3CEndpointReference terminatorCoordinatorRPC = getTerminationCoordinatorRPC(ctx) ; tidyup();