Examples of TxContextImple


Examples of com.arjuna.mwlabs.wst11.at.context.TxContextImple

        {
            TxContext current = _ctxManager.currentTransaction();
            if ((current == null) || !(current instanceof TxContextImple))
                throw new WrongStateException();

            TxContextImple currentImple = (TxContextImple) current;
            Context ctx = startTransaction(timeout, currentImple);

            _ctxManager.resume(new TxContextImple(ctx));
            // n.b. we don't enlist the subordinate transaction for completion
            // that ensures that any attempt to commit or rollback will fail
        }
        catch (com.arjuna.wsc.InvalidCreateParametersException ex)
        {
View Full Code Here

Examples of com.arjuna.mwlabs.wst11.at.context.TxContextImple

  {
    try
    {
      TransactionManagerImple tm = (TransactionManagerImple) TransactionManager.getTransactionManager();

            final TxContextImple txContext = (TxContextImple) tm.currentTransaction();
            final String id = txContext.identifier();
            final W3CEndpointReference completionCoordinator = tm.enlistForCompletion(getCompletionParticipant(id, txContext.isSecure()));

      _completionCoordinators.put(id, completionCoordinator);
    }
    catch (com.arjuna.wsc.AlreadyRegisteredException ex)
    {
View Full Code Here

Examples of com.arjuna.mwlabs.wst11.at.context.TxContextImple

  private final void commitWithoutAck ()
      throws TransactionRolledBackException, UnknownTransactionException,
      SecurityException, SystemException, WrongStateException
  {
    TxContextImple ctx = null;
    String id = null;

    try
    {
      ctx = (TxContextImple) _ctxManager.suspend();
            if (ctx == null) {
                throw new WrongStateException();
            }
      id = ctx.identifier();

      /*
       * By default the completionParticipantURL won't be set for an interposed (imported)
       * bridged transaction. This is fine, because you shouldn't be able to commit that
       * transaction from a node in the tree, only from the root. So, we can prevent commit
View Full Code Here

Examples of com.arjuna.mwlabs.wst11.at.context.TxContextImple

  }

  private final void abortWithoutAck () throws UnknownTransactionException, SecurityException,
      SystemException, WrongStateException
  {
    TxContextImple ctx = null;
    String id = null;

    try
    {
      ctx = (TxContextImple) _ctxManager.suspend();
            if (ctx == null) {
                throw new WrongStateException();
            }
      id = ctx.identifier();

      /*
       * By default the completionParticipantURL won't be set for an interposed (imported)
       * bridged transaction. This is fine, because you shouldn't be able to commit that
       * transaction from a node in the tree, only from the root. So, we can prevent commit
View Full Code Here

Examples of com.arjuna.mwlabs.wst11.at.context.TxContextImple

      throws WrongStateException, UnknownTransactionException,
      AlreadyRegisteredException, SystemException
  {
    try
    {
      TxContextImple currentTx = (TxContextImple) _ctxManager.currentTransaction();

      if (currentTx == null)
        throw new com.arjuna.wsc.NoActivityException();

      return registerParticipant(participantEndpoint, AtomicTransactionConstants.WSAT_SUB_PROTOCOL_COMPLETION);
View Full Code Here

Examples of com.arjuna.mwlabs.wst11.ba.context.TxContextImple

          if (_ctxManager.currentTransaction() != null)
            throw new WrongStateException();

          Context ctx = startTransaction(timeout);

          _ctxManager.resume(new TxContextImple(ctx));
      }
      catch (InvalidCreateParametersException ex)
      {
          tidyup();
View Full Code Here

Examples of com.arjuna.mwlabs.wst11.ba.context.TxContextImple

      }
    }

    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();
View Full Code Here

Examples of com.arjuna.mwlabs.wst11.ba.context.TxContextImple

      }
    }

    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();
View Full Code Here

Examples of com.arjuna.mwlabs.wst11.ba.context.TxContextImple

    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();
View Full Code Here

Examples of com.arjuna.mwlabs.wst11.ba.context.TxContextImple

    }

    private final W3CEndpointReference registerParticipant(final W3CEndpointReference participant, final String protocol)
        throws com.arjuna.wsc.InvalidProtocolException, com.arjuna.wsc.InvalidStateException, com.arjuna.wsc.CannotRegisterException, SystemException
    {
      TxContextImple currentTx = null;

      try
      {
          currentTx = (TxContextImple) _ctxManager.currentTransaction();

          if (currentTx == null)
            throw new com.arjuna.wsc.NoActivityException();

            final CoordinationContextType coordinationContext = currentTx.context().getCoordinationContext() ;
            final String messageId = MessageId.getMessageId() ;
            return RegistrationCoordinator.register(coordinationContext, messageId, participant, protocol) ;
      }
        catch (final SoapFault sf)
        {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.