Package org.apache.activemq.camel.component

Examples of org.apache.activemq.camel.component.ActiveMQComponent


      if (camelContext == null) {
        LOG.debug("Creating camel context");
        camelContext = new DefaultCamelContext();
        ActiveMQConfiguration conf = new ActiveMQConfiguration();
        conf.setConnectionFactory(new PooledConnectionFactory((ActiveMQConnectionFactory)factory));
        ActiveMQComponent component = new ActiveMQComponent(conf);
        camelContext.addComponent("activemq", component);
      }
      return camelContext;
    }
View Full Code Here


    @Override
    protected Context createJndiContext() throws Exception {
        JndiContext answer = new JndiContext();

        // add ActiveMQ with embedded broker
        ActiveMQComponent amq = ActiveMQComponent.activeMQComponent("vm://localhost?broker.persistent=false");
        amq.setCamelContext(context);
        answer.bind("jms", amq);
        return answer;
    }
View Full Code Here

    @Override
    protected Context createJndiContext() throws Exception {
        JndiContext answer = new JndiContext();

        // add ActiveMQ with embedded broker
        ActiveMQComponent amq = ActiveMQComponent.activeMQComponent("vm://localhost?broker.persistent=false");
        amq.setCamelContext(context);
        answer.bind("jms", amq);
        return answer;
    }
View Full Code Here

    @Override
    protected Context createJndiContext() throws Exception {
        JndiContext answer = new JndiContext();

        // add ActiveMQ with embedded broker
        ActiveMQComponent amq = ActiveMQComponent.activeMQComponent("vm://localhost?broker.persistent=false");
        amq.setCamelContext(context);
        answer.bind("jms", amq);
        return answer;
    }
View Full Code Here

    @Override
    protected Context createJndiContext() throws Exception {
        JndiContext answer = new JndiContext();

        // add ActiveMQ with embedded broker
        ActiveMQComponent amq = ActiveMQComponent.activeMQComponent("vm://localhost?broker.persistent=false");
        amq.setCamelContext(context);
        answer.bind("jms", amq);
        answer.bind("myBean", new MyBean());
        return answer;
    }
View Full Code Here

            ContextBuilder contextBuilderCorrelationID = new ContextBuilder() {
                public CamelContext buildContext(CamelContext context) throws Exception {
                    ConnectionFactory connectionFactory =
                        CamelJmsTestHelper.createConnectionFactory();
                    ActiveMQComponent jmsComponent = ActiveMQComponent.activeMQComponent();
                    jmsComponent.setConnectionFactory(connectionFactory);
                    jmsComponent.setUseMessageIDAsCorrelationID(false);
                    jmsComponent.setConcurrentConsumers(maxServerTasks);
                    context.addComponent(componentName, jmsComponent);
                    return context;
                }
            };

            ContextBuilder contextBuilderMessageIDNamedReplyToSelector = new ContextBuilder() {
                public CamelContext buildContext(CamelContext context) throws Exception {
                    ConnectionFactory connectionFactory =
                        CamelJmsTestHelper.createConnectionFactory();
                    ActiveMQComponent jmsComponent = ActiveMQComponent.activeMQComponent();
                    jmsComponent.setConnectionFactory(connectionFactory);
                    jmsComponent.setUseMessageIDAsCorrelationID(true);
                    jmsComponent.setConcurrentConsumers(maxServerTasks);
                    jmsComponent.getConfiguration().setReplyToDestinationSelectorName(REPLY_TO_DESTINATION_SELECTOR_NAME);
                    context.addComponent(componentName, jmsComponent);
                    return context;
                }
            };

            ContextBuilder contextBuilderCorrelationIDNamedReplyToSelector = new ContextBuilder() {
                public CamelContext buildContext(CamelContext context) throws Exception {
                    ConnectionFactory connectionFactory =
                        CamelJmsTestHelper.createConnectionFactory();
                    ActiveMQComponent jmsComponent = ActiveMQComponent.activeMQComponent();
                    jmsComponent.setConnectionFactory(connectionFactory);
                    jmsComponent.setUseMessageIDAsCorrelationID(false);
                    jmsComponent.setConcurrentConsumers(maxServerTasks);
                    jmsComponent.getConfiguration().setReplyToDestinationSelectorName(REPLY_TO_DESTINATION_SELECTOR_NAME);
                    context.addComponent(componentName, jmsComponent);
                    return context;
                }
            };


            ContextBuilder contextBuilderCorrelationIDDiffComp = new ContextBuilder() {
                public CamelContext buildContext(CamelContext context) throws Exception {
                    ConnectionFactory connectionFactory =
                        CamelJmsTestHelper.createConnectionFactory();
                    ActiveMQComponent jmsComponent = ActiveMQComponent.activeMQComponent();
                    jmsComponent.setConnectionFactory(connectionFactory);
                    jmsComponent.setConcurrentConsumers(maxServerTasks);
                    context.addComponent(componentName, jmsComponent);

                    ActiveMQComponent jmsComponent1 = ActiveMQComponent.activeMQComponent();
                    jmsComponent1.setConnectionFactory(connectionFactory);
                    jmsComponent1.setUseMessageIDAsCorrelationID(false);
                    jmsComponent1.setConcurrentConsumers(maxServerTasks);
                    context.addComponent(componentName1, jmsComponent1);
                    return context;
                }
            };

            ContextBuilder contextBuilderMessageIDDiffComp = new ContextBuilder() {
                public CamelContext buildContext(CamelContext context) throws Exception {
                    ConnectionFactory connectionFactory =
                        CamelJmsTestHelper.createConnectionFactory();
                    ActiveMQComponent jmsComponent = ActiveMQComponent.activeMQComponent();
                    jmsComponent.setConnectionFactory(connectionFactory);
                    jmsComponent.setUseMessageIDAsCorrelationID(true);
                    jmsComponent.setConcurrentConsumers(maxServerTasks);
                    context.addComponent(componentName, jmsComponent);

                    ActiveMQComponent jmsComponent1 = ActiveMQComponent.activeMQComponent();
                    jmsComponent1.setConnectionFactory(connectionFactory);
                    jmsComponent1.setUseMessageIDAsCorrelationID(true);
                    jmsComponent1.setConcurrentConsumers(maxServerTasks);
                    context.addComponent(componentName1, jmsComponent1);
                    return context;
                }
            };
View Full Code Here

TOP

Related Classes of org.apache.activemq.camel.component.ActiveMQComponent

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.