Package com.arjuna.mwlabs.wst.at.context

Examples of com.arjuna.mwlabs.wst.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


    }

  private final EndpointReferenceType registerParticipant (final EndpointReferenceType participant, final String protocol)
      throws InvalidProtocolException, InvalidStateException, NoActivityException, SystemException
  {
    TxContextImple currentTx = null;

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

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

            final CoordinationContextType coordinationContext = currentTx.context().getCoordinationContext() ;
            final String messageId = new Uid().stringForm() ;
            return RegistrationCoordinator.register(coordinationContext, messageId, participant, protocol) ;
    }
    catch (final SoapFault sf)
    {
View Full Code Here

            try {
                context = atContextFactory.create(AtomicTransactionConstants.WSAT_PROTOCOL, 0L, cc);
            } catch (InvalidCreateParametersException e) {
                // should not happen
            }
            subordinateTxContext = new TxContextImple(context);
            subordinateContextMap.put(identifier, subordinateTxContext);

            // register a cleanup callback with the subordinate transactionso that the entry gets removed
            // when the transcation commits or rolls back
View Full Code Here

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

      final CoordinationContextType ctx = _factory.create(AtomicTransactionConstants.WSAT_PROTOCOL, null, null);

      TxContextImple theContext = new TxContextImple(ctx);

      _contextManager.resume(theContext);
    }
    catch (com.arjuna.wst.UnknownTransactionException ex)
    {
View Full Code Here

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

      com.arjuna.mw.wsc.context.Context ctx = startTransaction(timeout, null);

      _ctxManager.resume(new TxContextImple(ctx));

      enlistCompletionParticipants();
    }
    catch (com.arjuna.wsc.InvalidCreateParametersException ex)
    {
View Full Code Here

        try
        {
            TxContext current = _ctxManager.currentTransaction();
            if (current == null || !(current instanceof TxContextImple))
                throw new WrongStateException();
            TxContextImple currentImple = (TxContextImple)current;
            com.arjuna.mw.wsc.context.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

  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

  }

  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

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

      final CoordinationContextType ctx = _factory.create(AtomicTransactionConstants.WSAT_PROTOCOL, null, null);

      TxContextImple theContext = new TxContextImple(ctx);

      _contextManager.resume(theContext);
    }
    catch (com.arjuna.wst.UnknownTransactionException ex)
    {
View Full Code Here

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

      com.arjuna.mw.wsc.context.Context ctx = startTransaction(timeout);

      _ctxManager.resume(new TxContextImple(ctx));
     
      enlistCompletionParticipants();
    }
    catch (com.arjuna.wsc.InvalidCreateParametersException ex)
    {
View Full Code Here

TOP

Related Classes of com.arjuna.mwlabs.wst.at.context.TxContextImple

Copyright © 2018 www.massapicom. 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.