Package org.activemq.ra

Examples of org.activemq.ra.ActiveMQActivationSpec


        broker.getRegistry().addComponentPacketListener(this);
        try {
          resourceAdapter = createResourceAdapter();
         
          // Inbound connector
          ActiveMQActivationSpec ac = new ActiveMQActivationSpec();
          ac.setDestinationType("javax.jms.Queue");
          ac.setDestination(INBOUND_PREFIX + broker.getContainerName());
          containerConnector = new JCAConnector();
          containerConnector.setBootstrapContext(getBootstrapContext());
          containerConnector.setActivationSpec(ac);
          containerConnector.setResourceAdapter(resourceAdapter);
          containerConnector.setEndpointFactory(new SingletonEndpointFactory(this, getTransactionManager()));
          containerConnector.afterPropertiesSet();
         
          // Outbound connector
          ActiveMQManagedConnectionFactory mcf = new ActiveMQManagedConnectionFactory();
          mcf.setResourceAdapter(resourceAdapter);
          ConnectionFactory cf = (ConnectionFactory) mcf.createConnectionFactory(getConnectionManager());
          jmsTemplate = new JmsTemplate(cf);
          jmsTemplate.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
          jmsPersistentTemplate = new JmsTemplate(cf);
          jmsPersistentTemplate.setDeliveryMode(DeliveryMode.PERSISTENT);
         
          // Inbound broadcast
          ac = new ActiveMQActivationSpec();
          ac.setDestinationType("javax.jms.Topic");
          ac.setDestination(broadcastDestinationName);
          broadcastConnector = new JCAConnector();
          broadcastConnector.setBootstrapContext(getBootstrapContext());
          broadcastConnector.setActivationSpec(ac);
          broadcastConnector.setResourceAdapter(resourceAdapter);
          broadcastConnector.setEndpointFactory(new SingletonEndpointFactory(this));
View Full Code Here


     */
    public void onEvent(final ComponentPacketEvent event) {
        try {
            String componentName = event.getPacket().getComponentNameSpace().getName();
            if (event.getStatus() == ComponentPacketEvent.ACTIVATED){         
              ActiveMQActivationSpec ac = new ActiveMQActivationSpec();
              ac.setDestinationType("javax.jms.Queue");
              ac.setDestination(INBOUND_PREFIX + componentName);
              JCAConnector connector = new JCAConnector();
              connector.setBootstrapContext(getBootstrapContext());
              connector.setActivationSpec(ac);
              connector.setResourceAdapter(resourceAdapter);
              connector.setEndpointFactory(new SingletonEndpointFactory(this, getTransactionManager()));
View Full Code Here

        ra.setServerUrl("vm://localhost");

        ResourceAdapterWrapper raWrapper = new ResourceAdapterWrapper(ra, workManager);
        raWrapper.doStart();

        ActiveMQActivationSpec as = new ActiveMQActivationSpec();
        as.setDestination("TEST");
        as.setDestinationType(Queue.class.getName());
            ActivationSpecWrapper asWrapper = new ActivationSpecWrapper(as, raWrapper);

        final Latch messageDelivered = new Latch();
        MessageEndpointFactory messageEndpointFactory = new MessageEndpointFactory() {
            public MessageEndpoint createEndpoint(XAResource resource) throws UnavailableException {
View Full Code Here

        jcac.setWorkManager(wm);

        jcac.afterPropertiesSet();

        ActiveMQActivationSpec spec = new ActiveMQActivationSpec();
        spec.setDestinationType(Queue.class.getName());
        spec.setDestination("GauntletWorkQueue");
        spec.validate();

        JCAConnector connector = jcac.addConnector();
        connector.setActivationSpec(spec);
        connector.setRef("test");
        connector.setBeanFactory(jcac.getBeanFactory());
View Full Code Here

TOP

Related Classes of org.activemq.ra.ActiveMQActivationSpec

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.