Package com.arjuna.webservices.wscoor

Examples of com.arjuna.webservices.wscoor.AttributedUnsignedIntType


        final Long expires = null ;
        final CoordinationContextType coordinationContext = new CoordinationContextType() ;
        coordinationContext.setCoordinationType(new URI(coordinationType)) ;
        coordinationContext.setRegistrationService(activationCoordinatorService) ;
        coordinationContext.setIdentifier(new AttributedURIType(TestUtil.PROTOCOL_IDENTIFIER)) ;
        coordinationContext.setExpires(new AttributedUnsignedIntType(123456L)) ;
       
        executeRequestTest(messageId, coordinationType, expires, coordinationContext) ;
    }
View Full Code Here


        final Long expires = new Long(123456L) ;
        final CoordinationContextType coordinationContext = new CoordinationContextType() ;
        coordinationContext.setCoordinationType(new URI(coordinationType)) ;
        coordinationContext.setRegistrationService(activationCoordinatorService) ;
        coordinationContext.setIdentifier(new AttributedURIType(TestUtil.PROTOCOL_IDENTIFIER)) ;
        coordinationContext.setExpires(new AttributedUnsignedIntType(1234567L)) ;
       
        executeRequestTest(messageId, coordinationType, expires, coordinationContext) ;
    }
View Full Code Here

   
    private void executeRequestTest(final String messageId, final String coordinationType, final Long expires, final CoordinationContextType coordinationContext)
        throws Exception
    {
        final AddressingContext addressingContext = AddressingContext.createRequestContext(activationCoordinatorService, messageId) ;
        final AttributedUnsignedIntType expiresValue = (expires == null ? null : new AttributedUnsignedIntType(expires.longValue())) ;
        ActivationCoordinatorClient.getClient().sendCreateCoordination(addressingContext, coordinationType, expiresValue, coordinationContext) ;
       
        final CreateCoordinationContextDetails details = testActivationCoordinatorProcessor.getCreateCoordinationContextDetails(messageId, 10000) ;
        final CreateCoordinationContextType requestCreateCoordinationContext = details.getCreateCoordinationContext() ;
        final AddressingContext requestAddressingContext = details.getAddressingContext() ;
View Full Code Here

        final CoordinationContextType currentContext)
        throws InvalidCreateParametersException, SoapFault
    {
        final AddressingContext addressingContext = AddressingContext.createRequestContext(activationCoordinatorURI, messageID) ;
       
        final AttributedUnsignedIntType expiresValue = (expires == null ? null : new AttributedUnsignedIntType(expires.longValue())) ;
        final RequestCallback callback = new RequestCallback() ;
        final ActivationRequesterProcessor activationRequester = ActivationRequesterProcessor.getRequester() ;
        activationRequester.registerCallback(messageID, callback) ;
        try
        {
View Full Code Here

                coordinationContext.setCoordinationType(new URI(coordinationTypeURI)) ;
                coordinationContext.setIdentifier(new AttributedURIType(jtaContext.getTransactionIdentifier())) ;
                final int transactionExpires = jtaContext.getTransactionExpires() ;
                if (transactionExpires > 0)
                {
                    coordinationContext.setExpires(new AttributedUnsignedIntType(transactionExpires)) ;
                }
                final EndpointReferenceType registrationCoordinator = new EndpointReferenceType(new AttributedURIType(registrationCoordinatorURI)) ;
                InstanceIdentifier.setEndpointInstanceIdentifier(registrationCoordinator, jtaContext.getTransactionIdentifier()) ;
                coordinationContext.setRegistrationService(registrationCoordinator) ;
View Full Code Here

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

                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.
         */

        _coordManager.enlistSynchronization(new CleanupSynchronization(_coordManager.identifier().toString(), _theRegistrar));

        /*
         * TODO Uughh! This does a suspend for us! Left over from original
         * WS-AS stuff.
         *
         * TODO
         * REFACTOR, REFACTOR, REFACTOR.
         */
       
        _theRegistrar.associate();

        return coordinationContext;
                } else {
                    // we need to create a subordinate transaction and register it as both a durable and volatile
                    // participant with the registration service defined in the current context

                    SubordinateCoordinator subTx = (SubordinateCoordinator) createSubordinate();
                    // hmm, need to create wrappers here as the subTx is in WSCF which only knows
                    // about WSAS and WS-C and the participant is in WS-T
                    String vtppid = subTx.getVolatile2PhaseId();
                    String dtppid = subTx.getDurable2PhaseId();
                    Volatile2PCParticipant vtpp = new SubordinateVolatile2PCStub(subTx);
                    Durable2PCParticipant dtpp = new SubordinateDurable2PCStub(subTx);
                    final String messageId = MessageId.getMessageId() ;
                    EndpointReferenceType participant;
                    EndpointReferenceType coordinator;
                    participant= getParticipant(vtppid);
                    coordinator = RegistrationCoordinator.register(currentContext, messageId, participant, AtomicTransactionConstants.WSAT_SUB_PROTOCOL_VOLATILE_2PC) ;
                    ParticipantProcessor.getProcessor().activateParticipant(new ParticipantEngine(vtpp, vtppid, coordinator), vtppid) ;
                    participant= getParticipant(dtppid);
                    coordinator = RegistrationCoordinator.register(currentContext, messageId, participant, AtomicTransactionConstants.WSAT_SUB_PROTOCOL_DURABLE_2PC) ;
                    ParticipantProcessor.getProcessor().activateParticipant(new ParticipantEngine(dtpp, dtppid, coordinator), dtppid) ;

                    // ok now create the 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));
                    String txId = subTx.get_uid().stringForm();
                    coordinationContext.setIdentifier(new AttributedURIType("urn:"+ txId)) ;
                    AttributedUnsignedIntType expiresObject = currentContext.getExpires();
                    if (expiresObject != null) {
                        long transactionExpires = currentContext.getExpires().getValue();
                        if (transactionExpires > 0) {
                            coordinationContext.setExpires(new AttributedUnsignedIntType(transactionExpires)) ;
                        }
                    }
                    final EndpointReferenceType registrationCoordinator = new EndpointReferenceType(new AttributedURIType(registrationCoordinatorURI)) ;
                    InstanceIdentifier.setEndpointInstanceIdentifier(registrationCoordinator, txId) ;
                    coordinationContext.setRegistrationService(registrationCoordinator) ;
View Full Code Here

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

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

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

TOP

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

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.