Package com.arjuna.wsc11

Examples of com.arjuna.wsc11.RegistrationCoordinator


    {
        final com.arjuna.wsc11.RegistrarMapper registrarMapper = RegistrarMapper.getFactory() ;
        try
        {
            final String protocolIdentifier = register.getProtocolIdentifier() ;
            final Registrar registrar = registrarMapper.getRegistrar(protocolIdentifier) ;
           
            if (registrar != null)
            {
                try
                {
                    final W3CEndpointReference participantProtocolService = register.getParticipantProtocolService() ;
                    final InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier();
                    final W3CEndpointReference coordinationProtocolService =
                            registrar.register(participantProtocolService, protocolIdentifier, instanceIdentifier, isSecure) ;
                    final RegisterResponseType response = new RegisterResponseType() ;

                    response.setCoordinatorProtocolService(coordinationProtocolService);
                    return response;
                }
View Full Code Here


        final TestContextFactory testContextFactory = new TestContextFactory(TestUtil.COORDINATION_TYPE) ;

        contextFactoryMapper.addContextFactory(TestUtil.COORDINATION_TYPE, testContextFactory) ;
        contextFactoryMapper.addContextFactory(TestUtil.INVALID_CREATE_PARAMETERS_COORDINATION_TYPE, testContextFactory) ;

        final RegistrarMapper registrarMapper = RegistrarMapper.getFactory() ;
        final TestRegistrar testRegistrar = new TestRegistrar() ;

        registrarMapper.addRegistrar(TestUtil.PROTOCOL_IDENTIFIER, testRegistrar) ;
        registrarMapper.addRegistrar(TestUtil.ALREADY_REGISTERED_PROTOCOL_IDENTIFIER, testRegistrar) ;
        registrarMapper.addRegistrar(TestUtil.INVALID_PROTOCOL_PROTOCOL_IDENTIFIER, testRegistrar) ;
        registrarMapper.addRegistrar(TestUtil.INVALID_STATE_PROTOCOL_IDENTIFIER, testRegistrar) ;
        registrarMapper.addRegistrar(TestUtil.NO_ACTIVITY_PROTOCOL_IDENTIFIER, testRegistrar) ;
    }
View Full Code Here

    {
        final ContextFactoryMapper contextFactoryMapper = ContextFactoryMapper.getFactory() ;
        contextFactoryMapper.removeContextFactory(TestUtil.COORDINATION_TYPE);
        contextFactoryMapper.removeContextFactory(TestUtil.INVALID_CREATE_PARAMETERS_COORDINATION_TYPE);

        final RegistrarMapper registrarMapper = RegistrarMapper.getFactory() ;
        registrarMapper.removeRegistrar(TestUtil.PROTOCOL_IDENTIFIER);
        registrarMapper.removeRegistrar(TestUtil.ALREADY_REGISTERED_PROTOCOL_IDENTIFIER);
        registrarMapper.removeRegistrar(TestUtil.INVALID_PROTOCOL_PROTOCOL_IDENTIFIER);
        registrarMapper.removeRegistrar(TestUtil.INVALID_STATE_PROTOCOL_IDENTIFIER);
        registrarMapper.removeRegistrar(TestUtil.NO_ACTIVITY_PROTOCOL_IDENTIFIER);
    }
View Full Code Here

      SystemException
  {
    _coordManager = CoordinatorManagerFactory.coordinatorManager();

    // register with mapper using tx id as protocol identifier.
    final RegistrarMapper mapper = RegistrarMapper.getFactory();

    mapper.addRegistrar(
      BusinessActivityConstants.WSBA_SUB_PROTOCOL_PARTICIPANT_COMPLETION, this);
    mapper.addRegistrar(
      BusinessActivityConstants.WSBA_SUB_PROTOCOL_COORDINATOR_COMPLETION, this);
    mapper.addRegistrar(com.arjuna.webservices.wsarjtx.ArjunaTXConstants.WSARJTX_PROTOCOL_TERMINATION, this);
  }
View Full Code Here

     */
    public void contextInitialized(final ServletContextEvent servletContextEvent)
    {
        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WSC11) {
           public void run() {
               ActivationCoordinatorProcessor.setCoordinator(new ActivationCoordinatorProcessorImpl()) ;
               RegistrationCoordinatorProcessor.setCoordinator(new RegistrationCoordinatorProcessorImpl()) ;
           }
        };
        // this is the last WSC callback to be initialised so close the list
        Sequencer.close(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WSC11);
View Full Code Here

    public void contextInitialized(final ServletContextEvent servletContextEvent)
    {
        Sequencer.Callback callback = new Sequencer.Callback(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WSC11) {
           public void run() {
               ActivationCoordinatorProcessor.setCoordinator(new ActivationCoordinatorProcessorImpl()) ;
               RegistrationCoordinatorProcessor.setCoordinator(new RegistrationCoordinatorProcessorImpl()) ;
           }
        };
        // this is the last WSC callback to be initialised so close the list
        Sequencer.close(Sequencer.SEQUENCE_WSCOOR11, Sequencer.WEBAPP_WSC11);
    }
View Full Code Here

     * @param servletContextEvent The servlet context event.
     */
    public void contextInitialized(final ServletContextEvent servletContextEvent)
    {
        final ContextFactoryMapper contextFactoryMapper = ContextFactoryMapper.getFactory() ;
        final TestContextFactory testContextFactory = new TestContextFactory(TestUtil.COORDINATION_TYPE) ;

        contextFactoryMapper.addContextFactory(TestUtil.COORDINATION_TYPE, testContextFactory) ;
        contextFactoryMapper.addContextFactory(TestUtil.INVALID_CREATE_PARAMETERS_COORDINATION_TYPE, testContextFactory) ;

        final RegistrarMapper registrarMapper = RegistrarMapper.getFactory() ;
View Full Code Here

        contextFactoryMapper.addContextFactory(TestUtil.COORDINATION_TYPE, testContextFactory) ;
        contextFactoryMapper.addContextFactory(TestUtil.INVALID_CREATE_PARAMETERS_COORDINATION_TYPE, testContextFactory) ;

        final RegistrarMapper registrarMapper = RegistrarMapper.getFactory() ;
        final TestRegistrar testRegistrar = new TestRegistrar() ;

        registrarMapper.addRegistrar(TestUtil.PROTOCOL_IDENTIFIER, testRegistrar) ;
        registrarMapper.addRegistrar(TestUtil.ALREADY_REGISTERED_PROTOCOL_IDENTIFIER, testRegistrar) ;
        registrarMapper.addRegistrar(TestUtil.INVALID_PROTOCOL_PROTOCOL_IDENTIFIER, testRegistrar) ;
        registrarMapper.addRegistrar(TestUtil.INVALID_STATE_PROTOCOL_IDENTIFIER, testRegistrar) ;
View Full Code Here

        final String coordinationType = TestUtil.COORDINATION_TYPE ;
        final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(TestUtil11.activationCoordinatorService, messageId) ;
        CreateCoordinationContextResponseType response =
                ActivationCoordinatorClient.getClient().sendCreateCoordination(addressingProperties, coordinationType, null, null) ;

        final CreateCoordinationContextDetails details = testActivationCoordinatorProcessor.getCreateCoordinationContextDetails(messageId, 10000) ;
        final CreateCoordinationContextType requestCreateCoordinationContext = details.getCreateCoordinationContext() ;
        final AddressingProperties requestAddressingProperties = details.getAddressingProperties() ;

        assertEquals(requestAddressingProperties.getTo().getURI().toString(), TestUtil11.activationCoordinatorService);
        assertEquals(requestAddressingProperties.getMessageID().getURI().toString(), messageId);

        assertNull(requestCreateCoordinationContext.getExpires()) ;
View Full Code Here

    {
        final String coordinationType = TestUtil.INVALID_CREATE_PARAMETERS_COORDINATION_TYPE;
        try {
            ActivationCoordinator.createCoordinationContext(TestUtil11.activationCoordinatorService, messageId, coordinationType, null, null) ;
        } catch (InvalidCreateParametersException icpe) {
            final CreateCoordinationContextDetails details = testActivationCoordinatorProcessor.getCreateCoordinationContextDetails(messageId, 10000) ;
            final CreateCoordinationContextType requestCreateCoordinationContext = details.getCreateCoordinationContext() ;
            final AddressingProperties requestAddressingProperties = details.getAddressingProperties() ;
            assertEquals(requestAddressingProperties.getTo().getURI().toString(), TestUtil11.activationCoordinatorService);
            assertEquals(requestAddressingProperties.getMessageID().getURI().toString(), messageId);

            assertNull(requestCreateCoordinationContext.getExpires()) ;
            assertNull(requestCreateCoordinationContext.getCurrentContext()) ;
View Full Code Here

TOP

Related Classes of com.arjuna.wsc11.RegistrationCoordinator

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.