Package com.arjuna.wst

Examples of com.arjuna.wst.WrongStateException


public class TestWrongStateExceptionBAPMParticipant implements BAParticipantManager
{
    public void completed ()
        throws WrongStateException, SystemException
    {
        throw new WrongStateException();
    }
View Full Code Here


    }

    public void exit ()
        throws WrongStateException, SystemException
    {
        throw new WrongStateException();
    }
View Full Code Here

    }

    public void cannotComplete ()
        throws WrongStateException, SystemException
    {
        throw new WrongStateException();
    }
View Full Code Here

        {
            throw new SystemException("UnknownParticipantException");
        }
        catch (com.arjuna.mw.wsas.exceptions.WrongStateException ex)
        {
            throw new WrongStateException();
        }
        catch (com.arjuna.mw.wsas.exceptions.SystemException ex)
        {
            throw new SystemException(ex.toString());
        }
View Full Code Here

        {
            throw new SystemException("UnknownParticipantException");
        }
        catch (com.arjuna.mw.wsas.exceptions.WrongStateException ex)
        {
            throw new WrongStateException();
        }
        catch (com.arjuna.mw.wsas.exceptions.SystemException ex)
        {
            throw new SystemException(ex.toString());
        }
View Full Code Here

        {
            throw new SystemException("UnknownParticipantException");
        }
        catch (com.arjuna.mw.wsas.exceptions.WrongStateException ex)
        {
            throw new WrongStateException();
        }
        catch (com.arjuna.mw.wsas.exceptions.SystemException ex)
        {
            throw new SystemException(ex.toString());
        }
View Full Code Here

  public void begin (int timeout) throws WrongStateException, SystemException
  {
    try
    {
      if (_ctxManager.currentTransaction() != null)
        throw new WrongStateException();

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

      _ctxManager.resume(new TxContextImple(ctx));
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
View Full Code Here

    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
       * or rollback at this stage. The alternative would be to setup the completionParticipantURL
       * and throw the exception from the remote coordinator side (see enlistCompletionParticipants
       * for how to do this).
       *
       * The same applies for an interposed subordinate transaction created via beginSubordinate.
       */

      final EndpointReferenceType completionCoordinator = (EndpointReferenceType) _completionCoordinators.get(id);

      if (completionCoordinator == null)
        throw new WrongStateException();

      CompletionStub completionStub = new CompletionStub(id, completionCoordinator);

      completionStub.commit();
    }
View Full Code Here

    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
       * or rollback at this stage. The alternative would be to setup the completionParticipantURL
       * and throw the exception from the remote coordinator side (see enlistCompletionParticipants
       * for how to do this).
       *
       * The same applies for an interposed subordinate transaction created via beginSubordinate.
       */

      EndpointReferenceType completionCoordinator = (EndpointReferenceType) _completionCoordinators.get(id);

      if (completionCoordinator == null)
        throw new WrongStateException();

      CompletionStub completionStub = new CompletionStub(id, completionCoordinator);

      completionStub.rollback();
    }
View Full Code Here

TOP

Related Classes of com.arjuna.wst.WrongStateException

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.