Package org.apache.camel.util.jndi

Examples of org.apache.camel.util.jndi.JndiContext.bind()


    protected Context createJndiContext() throws Exception {
        JndiContext answer = new JndiContext();
        ConnectionFactory connectionFactory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=true");
        JmsComponent component = JmsComponent.jmsComponent(connectionFactory);
        component.setConcurrentConsumers(4);
        answer.bind("activemq", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
        answer.bind("myBean1", b1);
        answer.bind("myBean2", b2);
        answer.bind("myBean3", b3);
        return answer;
    }
View Full Code Here


        JndiContext answer = new JndiContext();
        ConnectionFactory connectionFactory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=true");
        JmsComponent component = JmsComponent.jmsComponent(connectionFactory);
        component.setConcurrentConsumers(4);
        answer.bind("activemq", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
        answer.bind("myBean1", b1);
        answer.bind("myBean2", b2);
        answer.bind("myBean3", b3);
        return answer;
    }
View Full Code Here

        ConnectionFactory connectionFactory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=true");
        JmsComponent component = JmsComponent.jmsComponent(connectionFactory);
        component.setConcurrentConsumers(4);
        answer.bind("activemq", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
        answer.bind("myBean1", b1);
        answer.bind("myBean2", b2);
        answer.bind("myBean3", b3);
        return answer;
    }

View Full Code Here

        JmsComponent component = JmsComponent.jmsComponent(connectionFactory);
        component.setConcurrentConsumers(4);
        answer.bind("activemq", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
        answer.bind("myBean1", b1);
        answer.bind("myBean2", b2);
        answer.bind("myBean3", b3);
        return answer;
    }


}
View Full Code Here

    }

    @Override
    protected Context createJndiContext() throws Exception {
        JndiContext answer = new JndiContext();
        answer.bind("myBean", myBean);
        return answer;
    }

    public int getExpectedMessageCount() {
        return expectedMessageCount;
View Full Code Here

        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();
        answer.bind("myBean", myBean);

        // add ActiveMQ with embedded broker
        ConnectionFactory connectionFactory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
        answer.bind("jms", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
        return answer;
View Full Code Here

        JndiContext answer = new JndiContext();
        answer.bind("myBean", myBean);

        // add ActiveMQ with embedded broker
        ConnectionFactory connectionFactory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
        answer.bind("jms", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
        return answer;
    }

    protected class MyBean {
        public void onMessage(String body) {
View Full Code Here

        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;
    }

    @Override
    protected RouteBuilder createRouteBuilder() throws Exception {
View Full Code Here

        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;
    }

    @Override
    protected RouteBuilder createRouteBuilder() throws Exception {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.