use of javax.jms.ConnectionFactory in project camel by apache.
the class AggregratedJmsRouteTest method createCamelContext.
protected CamelContext createCamelContext() throws Exception {
CamelContext camelContext = super.createCamelContext();
ConnectionFactory connectionFactory = CamelJmsTestHelper.createConnectionFactory();
camelContext.addComponent("jms", jmsComponentAutoAcknowledge(connectionFactory));
return camelContext;
}
use of javax.jms.ConnectionFactory in project camel by apache.
the class CamelJmsTestHelper method createPooledConnectionFactory.
public static PooledConnectionFactory createPooledConnectionFactory() {
ConnectionFactory cf = createConnectionFactory(null, null);
PooledConnectionFactory pooled = new PooledConnectionFactory();
pooled.setConnectionFactory(cf);
pooled.setMaxConnections(8);
return pooled;
}
use of javax.jms.ConnectionFactory in project camel by apache.
the class ConsumeJmsBytesMessageTest method createCamelContext.
protected CamelContext createCamelContext() throws Exception {
CamelContext camelContext = super.createCamelContext();
ConnectionFactory connectionFactory = CamelJmsTestHelper.createConnectionFactory();
jmsTemplate = new JmsTemplate(connectionFactory);
camelContext.addComponent("activemq", jmsComponentAutoAcknowledge(connectionFactory));
return camelContext;
}
use of javax.jms.ConnectionFactory in project camel by apache.
the class JmsEndpointConfigurationTest method testSetConnectionFactoryAndUsernameAndPassword.
@Test
public void testSetConnectionFactoryAndUsernameAndPassword() throws Exception {
JmsEndpoint endpoint = resolveMandatoryEndpoint("jms:topic:Foo.Bar?connectionFactory=#myConnectionFactory&username=James&password=ABC", JmsEndpoint.class);
ConnectionFactory cf = endpoint.getConfiguration().getConnectionFactory();
assertNotNull("The connectionFactory should not be null", cf);
assertTrue("The connectionFactory should be the instance of UserCredentialsConnectionFactoryAdapter", cf instanceof UserCredentialsConnectionFactoryAdapter);
}
use of javax.jms.ConnectionFactory in project camel by apache.
the class JmsErrorHandlerLogStackTraceTest method createCamelContext.
protected CamelContext createCamelContext() throws Exception {
CamelContext camelContext = super.createCamelContext();
ConnectionFactory connectionFactory = CamelJmsTestHelper.createConnectionFactory();
JmsComponent jms = JmsComponent.jmsComponentAutoAcknowledge(connectionFactory);
jms.setErrorHandlerLogStackTrace(false);
jms.setErrorHandlerLoggingLevel(LoggingLevel.ERROR);
camelContext.addComponent("jms", jms);
return camelContext;
}
Aggregations