Search in sources :

Example 21 with JmsComponent

use of org.apache.camel.component.jms.JmsComponent 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;
}
Also used : ConnectionFactory(javax.jms.ConnectionFactory) JmsComponent(org.apache.camel.component.jms.JmsComponent) JndiContext(org.apache.camel.util.jndi.JndiContext)

Example 22 with JmsComponent

use of org.apache.camel.component.jms.JmsComponent 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;
}
Also used : ConnectionFactory(javax.jms.ConnectionFactory) JmsComponent(org.apache.camel.component.jms.JmsComponent) JndiContext(org.apache.camel.util.jndi.JndiContext)

Example 23 with JmsComponent

use of org.apache.camel.component.jms.JmsComponent 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;
}
Also used : ConnectionFactory(javax.jms.ConnectionFactory) JmsComponent(org.apache.camel.component.jms.JmsComponent) JndiContext(org.apache.camel.util.jndi.JndiContext)

Example 24 with JmsComponent

use of org.apache.camel.component.jms.JmsComponent 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;
}
Also used : ConnectionFactory(javax.jms.ConnectionFactory) JmsComponent(org.apache.camel.component.jms.JmsComponent) JndiContext(org.apache.camel.util.jndi.JndiContext)

Example 25 with JmsComponent

use of org.apache.camel.component.jms.JmsComponent 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;
}
Also used : ConnectionFactory(javax.jms.ConnectionFactory) JmsComponent(org.apache.camel.component.jms.JmsComponent) JndiContext(org.apache.camel.util.jndi.JndiContext)

Aggregations

JmsComponent (org.apache.camel.component.jms.JmsComponent)25 ConnectionFactory (javax.jms.ConnectionFactory)21 JndiContext (org.apache.camel.util.jndi.JndiContext)16 CamelContext (org.apache.camel.CamelContext)6 ActiveMQConnectionFactory (org.apache.activemq.ActiveMQConnectionFactory)3 HashMap (java.util.HashMap)1 Map (java.util.Map)1 ActiveMQSslConnectionFactory (org.apache.activemq.ActiveMQSslConnectionFactory)1 BrokerService (org.apache.activemq.broker.BrokerService)1 PooledConnectionFactory (org.apache.activemq.pool.PooledConnectionFactory)1 RouteBuilder (org.apache.camel.builder.RouteBuilder)1 AMQPComponent (org.apache.camel.component.amqp.AMQPComponent)1 JmsConfiguration (org.apache.camel.component.jms.JmsConfiguration)1 PassThroughJmsKeyFormatStrategy (org.apache.camel.component.jms.PassThroughJmsKeyFormatStrategy)1 DefaultCamelContext (org.apache.camel.impl.DefaultCamelContext)1 CamelBeanPostProcessor (org.apache.camel.spring.CamelBeanPostProcessor)1 JmsConnectionFactory (org.apache.qpid.jms.JmsConnectionFactory)1 Ignore (org.junit.Ignore)1 Test (org.junit.Test)1 ConditionalOnBean (org.springframework.boot.autoconfigure.condition.ConditionalOnBean)1