Package com.arjuna.wst

Examples of com.arjuna.wst.WrongStateException


    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 W3CEndpointReference completionCoordinator = (W3CEndpointReference) _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.
       */

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

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

      CompletionStub completionStub = new CompletionStub(id, completionCoordinator);

      completionStub.rollback();
    }
View Full Code Here

public class TestWrongStateExceptionBusinessAgreementWithParticipantCompletionParticipant implements BusinessAgreementWithParticipantCompletionParticipant
{

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

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

  throw new WrongStateException();
    }

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

  return Status.STATUS_ACTIVE;
    }
   
    public void forget () throws WrongStateException, SystemException
    {
  throw new WrongStateException();
    }
View Full Code Here

        {
            throw new SystemException() ;
        }
        else if (state != State.STATE_ENDED)
        {
            throw new WrongStateException() ;
        }
    }
View Full Code Here

        {
            throw new SystemException() ;
        }
        else if (state != State.STATE_ENDED)
        {
            throw new WrongStateException() ;
        }
    }
View Full Code Here

        {
            throw new FaultedException() ;
        }
        else if (state != State.STATE_ENDED)
        {
            throw new WrongStateException() ;
        }
    }
View Full Code Here

        else if ((state == State.STATE_FAULTING_COMPENSATING) || (state == State.STATE_CANCELING_COMPLETING) ||
            (state == State.STATE_EXITING))
        {
            throw new SystemException() ;
        }
        throw new WrongStateException() ;
    }
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.