Search in sources :

Example 71 with ConnectionFactory

use of javax.jms.ConnectionFactory in project camel by apache.

the class JmsNotIncludeAllJMSXPropertiesTest method createCamelContext.

protected CamelContext createCamelContext() throws Exception {
    CamelContext camelContext = super.createCamelContext();
    ConnectionFactory connectionFactory = CamelJmsTestHelper.createConnectionFactory();
    JmsComponent jms = jmsComponentAutoAcknowledge(connectionFactory);
    jms.setIncludeAllJMSXProperties(false);
    camelContext.addComponent("activemq", jms);
    return camelContext;
}
Also used : CamelContext(org.apache.camel.CamelContext) ConnectionFactory(javax.jms.ConnectionFactory)

Example 72 with ConnectionFactory

use of javax.jms.ConnectionFactory in project camel by apache.

the class JmsOnCompletionTest method createCamelContext.

protected CamelContext createCamelContext() throws Exception {
    CamelContext camelContext = super.createCamelContext();
    ConnectionFactory connectionFactory = CamelJmsTestHelper.createConnectionFactory();
    camelContext.addComponent("activemq", jmsComponentAutoAcknowledge(connectionFactory));
    return camelContext;
}
Also used : CamelContext(org.apache.camel.CamelContext) ConnectionFactory(javax.jms.ConnectionFactory)

Example 73 with ConnectionFactory

use of javax.jms.ConnectionFactory in project camel by apache.

the class JmsMessageCreatedStrategyComponentTest method createCamelContext.

protected CamelContext createCamelContext() throws Exception {
    CamelContext camelContext = super.createCamelContext();
    ConnectionFactory connectionFactory = CamelJmsTestHelper.createConnectionFactory();
    camelContext.addComponent(componentName, jmsComponentAutoAcknowledge(connectionFactory));
    JmsComponent jms = camelContext.getComponent(componentName, JmsComponent.class);
    jms.setMessageCreatedStrategy(new MyMessageCreatedStrategy());
    return camelContext;
}
Also used : CamelContext(org.apache.camel.CamelContext) ConnectionFactory(javax.jms.ConnectionFactory)

Example 74 with ConnectionFactory

use of javax.jms.ConnectionFactory in project camel by apache.

the class JmsMessageTypeTest method createCamelContext.

protected CamelContext createCamelContext() throws Exception {
    CamelContext camelContext = super.createCamelContext();
    ConnectionFactory connectionFactory = CamelJmsTestHelper.createConnectionFactory();
    camelContext.addComponent("jms", jmsComponentAutoAcknowledge(connectionFactory));
    camelContext.getTypeConverterRegistry().addTypeConverter(byte[].class, MyFooBean.class, new MyFooBean());
    camelContext.getTypeConverterRegistry().addTypeConverter(String.class, MyFooBean.class, new MyFooBean());
    camelContext.getTypeConverterRegistry().addTypeConverter(Map.class, MyFooBean.class, new MyFooBean());
    return camelContext;
}
Also used : CamelContext(org.apache.camel.CamelContext) ConnectionFactory(javax.jms.ConnectionFactory)

Example 75 with ConnectionFactory

use of javax.jms.ConnectionFactory in project camel by apache.

the class JmsInOnlyWithReplyToDisabledTest method createCamelContext.

protected CamelContext createCamelContext() throws Exception {
    CamelContext camelContext = super.createCamelContext();
    ConnectionFactory connectionFactory = CamelJmsTestHelper.createConnectionFactory();
    camelContext.addComponent("activemq", jmsComponentAutoAcknowledge(connectionFactory));
    return camelContext;
}
Also used : CamelContext(org.apache.camel.CamelContext) ConnectionFactory(javax.jms.ConnectionFactory)

Aggregations

ConnectionFactory (javax.jms.ConnectionFactory)620 Connection (javax.jms.Connection)237 CamelContext (org.apache.camel.CamelContext)220 Session (javax.jms.Session)193 TextMessage (javax.jms.TextMessage)148 MessageConsumer (javax.jms.MessageConsumer)143 MessageProducer (javax.jms.MessageProducer)142 Test (org.junit.Test)128 JMSException (javax.jms.JMSException)106 InitialContext (javax.naming.InitialContext)106 Destination (javax.jms.Destination)93 Queue (javax.jms.Queue)91 ActiveMQConnectionFactory (org.apache.activemq.ActiveMQConnectionFactory)80 ActiveMQConnectionFactory (org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory)61 Message (javax.jms.Message)56 Context (javax.naming.Context)35 NamingException (javax.naming.NamingException)33 QueueConnectionFactory (javax.jms.QueueConnectionFactory)31 TopicConnectionFactory (javax.jms.TopicConnectionFactory)31 Topic (javax.jms.Topic)29