use of org.apache.camel.util.jndi.JndiContext in project camel by apache.
the class JmsHttpJmsTest method createJndiContext.
@Override
protected Context createJndiContext() throws Exception {
JndiContext answer = new JndiContext();
// add ActiveMQ with embedded broker
ConnectionFactory connectionFactory = CamelJmsTestHelper.createConnectionFactory();
JmsComponent amq = jmsComponentAutoAcknowledge(connectionFactory);
amq.setCamelContext(context);
answer.bind("jms", amq);
return answer;
}
use of org.apache.camel.util.jndi.JndiContext in project camel by apache.
the class JmsJettyAsyncTest method createJndiContext.
@Override
protected Context createJndiContext() throws Exception {
JndiContext answer = new JndiContext();
// add ActiveMQ with embedded broker
ConnectionFactory connectionFactory = CamelJmsTestHelper.createConnectionFactory();
JmsComponent amq = jmsComponentAutoAcknowledge(connectionFactory);
amq.setCamelContext(context);
answer.bind("activemq", amq);
return answer;
}
use of org.apache.camel.util.jndi.JndiContext in project camel by apache.
the class JmsPerformanceTest method createJndiContext.
@Override
protected Context createJndiContext() throws Exception {
JndiContext answer = new JndiContext();
answer.bind("myBean", new MyBean());
// add AMQ client and make use of connection pooling we depend on because of the (large) number
// of the JMS messages we do produce
// add ActiveMQ with embedded broker
ConnectionFactory connectionFactory = CamelJmsTestHelper.createConnectionFactory();
JmsComponent amq = jmsComponentAutoAcknowledge(connectionFactory);
amq.setCamelContext(context);
answer.bind("activemq", amq);
return answer;
}
use of org.apache.camel.util.jndi.JndiContext in project camel by apache.
the class JmsPollEnrichTest method createJndiContext.
@Override
protected Context createJndiContext() throws Exception {
deleteDirectory("activemq-data");
JndiContext answer = new JndiContext();
// add ActiveMQ with embedded broker which must be persistent
ConnectionFactory connectionFactory = CamelJmsTestHelper.createPersistentConnectionFactory();
JmsComponent amq = jmsComponentAutoAcknowledge(connectionFactory);
amq.setCamelContext(context);
answer.bind("jms", amq);
return answer;
}
use of org.apache.camel.util.jndi.JndiContext in project camel by apache.
the class JmsResequencerTest method createJndiContext.
@Override
protected Context createJndiContext() throws Exception {
JndiContext answer = new JndiContext();
// add ActiveMQ with embedded broker
ConnectionFactory connectionFactory = CamelJmsTestHelper.createConnectionFactory();
JmsComponent amq = jmsComponentAutoAcknowledge(connectionFactory);
amq.setCamelContext(context);
answer.bind("activemq", amq);
answer.bind("myBean1", b1);
answer.bind("myBean2", b2);
answer.bind("myBean3", b3);
return answer;
}
Aggregations