Package com.arjuna.webservices.wscoor

Examples of com.arjuna.webservices.wscoor.CoordinationContextType


                final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
                final String registrationCoordinatorURI = soapRegistry.getServiceURI(CoordinationConstants.SERVICE_REGISTRATION_COORDINATOR) ;
               
                final ArjunaContextImple arjunaContext = ArjunaContextImple.getContext() ;
                final CoordinationContextType coordinationContext = new CoordinationContextType() ;
                coordinationContext.setCoordinationType(new URI(coordinationTypeURI)) ;
                coordinationContext.setIdentifier(new AttributedURIType(arjunaContext.getTransactionIdentifier(0))) ;
                final int transactionExpires = arjunaContext.getTransactionExpires(0) ;
                if (transactionExpires > 0)
                {
                    coordinationContext.setExpires(new AttributedUnsignedIntType(transactionExpires)) ;
                }
                final EndpointReferenceType registrationCoordinator = new EndpointReferenceType(new AttributedURIType(registrationCoordinatorURI)) ;
                InstanceIdentifier.setEndpointInstanceIdentifier(registrationCoordinator, arjunaContext.getTransactionIdentifier(0)) ;
                coordinationContext.setRegistrationService(registrationCoordinator) ;

        /*
         * Now add the registrar for this specific coordinator to the
         * mapper.
         */
 
View Full Code Here


    {
        try
        {
            final Long expires = (timeout > 0 ? new Long(timeout) : null) ;
            final String messageId = new Uid().stringForm() ;
            final CoordinationContextType coordinationContext = ActivationCoordinator.createCoordinationContext(
                    _activationCoordinatorService, messageId, BusinessActivityConstants.WSBA_PROTOCOL_ATOMIC_OUTCOME, expires, null) ;
            if (coordinationContext == null)
            {
                throw new SystemException(
                    wstxLogger.log_mesg.getString("com.arjuna.mwlabs.wst.ba.remote.UserBusinessActivityImple_2"));
View Full Code Here

  }
   
    private EndpointReferenceType getTerminationCoordinator(final TxContextImple ctx)
        throws SystemException
    {
        final CoordinationContextType coordinationContext = ctx.context().getCoordinationContext() ;
        final String messageId = new Uid().stringForm() ;
        try
        {
            return RegistrationCoordinator.register(coordinationContext, messageId,
                getParticipantProtocolService(ctx.identifier()), ArjunaTXConstants.WSARJTX_PROTOCOL_TERMINATION) ;
View Full Code Here

                ArjunaContextImple arjunaContext = (ArjunaContextImple)manager.context();

                final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
                final String registrationCoordinatorURI = soapRegistry.getServiceURI(CoordinationConstants.SERVICE_REGISTRATION_COORDINATOR) ;
               
                final CoordinationContextType coordinationContext = new CoordinationContextType() ;
                coordinationContext.setCoordinationType(new URI(coordinationTypeURI)) ;
                coordinationContext.setIdentifier(new AttributedURIType(arjunaContext.getTransactionIdentifier())) ;
                final int transactionExpires = arjunaContext.getTransactionExpires() ;
                if (transactionExpires > 0)
                {
                    coordinationContext.setExpires(new AttributedUnsignedIntType(transactionExpires)) ;
                }
                final EndpointReferenceType registrationCoordinator = new EndpointReferenceType(new AttributedURIType(registrationCoordinatorURI)) ;
                InstanceIdentifier.setEndpointInstanceIdentifier(registrationCoordinator, arjunaContext.getTransactionIdentifier()) ;
                coordinationContext.setRegistrationService(registrationCoordinator) ;

                return coordinationContext;
          }
          catch (com.arjuna.mw.wsas.exceptions.SystemException ex)
          {
View Full Code Here

            final String coordinationType = createCoordinationContext.getCoordinationType().getValue() ;
            final ContextFactory contextFactory = contextFactoryMapper.getContextFactory(coordinationType) ;
           
            if (contextFactory != null)
            {
                final CoordinationContextType coordinationContext ;
                final AddressingContext responseAddressingContext ;
                try
                {
                    final AttributedUnsignedIntType expiresElement = createCoordinationContext.getExpires() ;
                    final Long expires = (expiresElement == null ? null : new Long(expiresElement.getValue())) ;
View Full Code Here

    try
    {
      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);
    }
View Full Code Here

       
                final ArjunaContextImple arjunaContext = ArjunaContextImple.getContext() ;
                final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
                final String registrationCoordinatorURI = soapRegistry.getServiceURI(CoordinationConstants.SERVICE_REGISTRATION_COORDINATOR) ;
               
                final CoordinationContextType coordinationContext = new CoordinationContextType() ;
                coordinationContext.setCoordinationType(new URI(coordinationTypeURI)) ;
                coordinationContext.setIdentifier(new AttributedURIType("urn:"+arjunaContext.getTransactionIdentifier())) ;
                final int transactionExpires = arjunaContext.getTransactionExpires() ;
                if (transactionExpires > 0)
                {
                    coordinationContext.setExpires(new AttributedUnsignedIntType(transactionExpires)) ;
                }
                final EndpointReferenceType registrationCoordinator = new EndpointReferenceType(new AttributedURIType(registrationCoordinatorURI)) ;
                InstanceIdentifier.setEndpointInstanceIdentifier(registrationCoordinator, arjunaContext.getTransactionIdentifier()) ;
                coordinationContext.setRegistrationService(registrationCoordinator) ;

        /*
         * Now add the registrar for this specific coordinator to the
         * mapper.
         */
 
View Full Code Here

        ArjunaContextImple arjunaContext = (ArjunaContextImple)manager.context();

                final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
                final String registrationCoordinatorURI = soapRegistry.getServiceURI(CoordinationConstants.SERVICE_REGISTRATION_COORDINATOR) ;
               
                final CoordinationContextType coordinationContext = new CoordinationContextType() ;
                coordinationContext.setCoordinationType(new URI(coordinationTypeURI)) ;
                coordinationContext.setIdentifier(new AttributedURIType("urn:"+arjunaContext.getTransactionIdentifier())) ;
                final int transactionExpires = arjunaContext.getTransactionExpires() ;
                if (transactionExpires > 0)
                {
                    coordinationContext.setExpires(new AttributedUnsignedIntType(transactionExpires)) ;
                }
                final EndpointReferenceType registrationCoordinator = new EndpointReferenceType(new AttributedURIType(registrationCoordinatorURI)) ;
                InstanceIdentifier.setEndpointInstanceIdentifier(registrationCoordinator, arjunaContext.getTransactionIdentifier()) ;
                coordinationContext.setRegistrationService(registrationCoordinator) ;

        return coordinationContext;
      }
      catch (com.arjuna.mw.wsas.exceptions.SystemException ex)
      {
View Full Code Here

     * @throws SoapFault for processing errors.
     */
    public void invoke(final XMLStreamReader in, final MessageContext messageContext)
        throws XMLStreamException, SoapFault
    {
        final CoordinationContextType coordinationContext = new CoordinationContextType(in) ;
        CoordinationContext.setContext(messageContext, coordinationContext) ;
    }
View Full Code Here

     */
    public void writeContent(final XMLStreamWriter out, final QName headerElementName,
        final MessageContext context, final SoapDetails soapDetails)
        throws XMLStreamException
    {
        final CoordinationContextType coordinationContext = CoordinationContext.getThreadContext() ;
        if (coordinationContext != null)
        {
            coordinationContext.putAttribute(soapDetails.getMustUnderstandQName(), soapDetails.getMustUnderstandValue()) ;
            StreamHelper.writeElement(out, CoordinationConstants.WSCOOR_ELEMENT_COORDINATION_CONTEXT_QNAME, coordinationContext) ;
        }
    }
View Full Code Here

TOP

Related Classes of com.arjuna.webservices.wscoor.CoordinationContextType

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.