Package com.arjuna.mwlabs.wst11.at.remote

Examples of com.arjuna.mwlabs.wst11.at.remote.UserSubordinateTransactionImple


                timeout = (longTimeout > Integer.MAX_VALUE ? Integer.MAX_VALUE : (int)longTimeout) ;
            }

        _coordManager.begin(timeout);

            final ArjunaContextImple arjunaContext = ArjunaContextImple.getContext() ;
            final ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry() ;
            final String registrationCoordinatorURI = serviceRegistry.getServiceURI(CoordinationConstants.REGISTRATION_SERVICE_NAME, isSecure) ;

            final CoordinationContext coordinationContext = new CoordinationContext() ;
            coordinationContext.setCoordinationType(coordinationTypeURI) ;
            CoordinationContextType.Identifier identifier = new CoordinationContextType.Identifier();
            identifier.setValue("urn:"+arjunaContext.getTransactionIdentifier());
            coordinationContext.setIdentifier(identifier) ;
            final int transactionExpires = arjunaContext.getTransactionExpires() ;
            if (transactionExpires > 0)
            {
                Expires expiresInstance = new Expires();
                expiresInstance.setValue(transactionExpires);
                coordinationContext.setExpires(expiresInstance);
            }
            final W3CEndpointReference registrationCoordinator = getRegistrationCoordinator(registrationCoordinatorURI, arjunaContext);
            coordinationContext.setRegistrationService(registrationCoordinator) ;

            String transactionIdentifier = arjunaContext.getTransactionIdentifier();
            BusinessActivityTerminator terminator = new BusinessActivityTerminatorImple();
            TerminationCoordinatorProcessor.getProcessor().activateParticipant(terminator, transactionIdentifier);

        _theRegistrar.associate();
View Full Code Here


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

          Context ctx = startTransaction(timeout);

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

      }
    }

    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

      }
    }

    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

    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

    }

    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

    }

    private final W3CEndpointReference registerParticipant(final W3CEndpointReference participant, final String protocol)
        throws com.arjuna.wsc.InvalidProtocolException, com.arjuna.wsc.InvalidStateException, com.arjuna.wsc.NoActivityException, 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

      {
        final String id = new Uid().stringForm();
        try
        {
                    final CoordinatorCompletionCoordinatorEngine engine = new CoordinatorCompletionCoordinatorEngine(id, participantProtocolService) ;
          BusinessAgreementWithCoordinatorCompletionImple participant = new BusinessAgreementWithCoordinatorCompletionImple(
              new BusinessAgreementWithCoordinatorCompletionStub(engine), id);
                    engine.setCoordinator(participant.participantManager()) ;

          _coordManager.enlistParticipant(participant);

          _coordManager.suspend();
View Full Code Here

      final String id = new Uid().stringForm();

      try
      {
                final ParticipantCompletionCoordinatorEngine engine = new ParticipantCompletionCoordinatorEngine(id, participantProtocolService) ;
        BusinessAgreementWithParticipantCompletionImple participant = new BusinessAgreementWithParticipantCompletionImple(
            new BusinessAgreementWithParticipantCompletionStub(engine), id);
                engine.setCoordinator(participant.participantManager()) ;

        _coordManager.enlistParticipant(participant);

        _coordManager.suspend();

        return getParticipantManager(
                        BusinessActivityConstants.PARTICIPANT_COMPLETION_COORDINATOR_SERVICE_QNAME,
                        BusinessActivityConstants.PARTICIPANT_COMPLETION_COORDINATOR_PORT_QNAME,
                        ServiceRegistry.getRegistry().getServiceURI(BusinessActivityConstants.PARTICIPANT_COMPLETION_COORDINATOR_SERVICE_NAME, isSecure),
            id);
      }
      catch (Exception ex)
      {
        throw new InvalidStateException();
      }
    }
    else
      if (BusinessActivityConstants.WSBA_SUB_PROTOCOL_COORDINATOR_COMPLETION
          .equals(protocolIdentifier))
      {
        final String id = new Uid().stringForm();
        try
        {
                    final CoordinatorCompletionCoordinatorEngine engine = new CoordinatorCompletionCoordinatorEngine(id, participantProtocolService) ;
          BusinessAgreementWithCoordinatorCompletionImple participant = new BusinessAgreementWithCoordinatorCompletionImple(
              new BusinessAgreementWithCoordinatorCompletionStub(engine), id);
                    engine.setCoordinator(participant.participantManager()) ;

          _coordManager.enlistParticipant(participant);

          _coordManager.suspend();
View Full Code Here

        BusinessAgreementWithParticipantCompletionParticipant resource,
        String id)
{
    _resource = resource;
    _identifier = id;
    _baParticipantManager = new BAParticipantManagerImple(id);
}
View Full Code Here

TOP

Related Classes of com.arjuna.mwlabs.wst11.at.remote.UserSubordinateTransactionImple

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.