use of org.apache.activemq.ActiveMQConnectionFactory in project camel by apache.
the class TransactedQueueProducerTest method createCamelContext.
/*
* @see org.apache.camel.test.junit4.CamelTestSupport#createCamelContext()
* @return
* @throws Exception
*/
@Override
protected CamelContext createCamelContext() throws Exception {
ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("vm://broker?broker.persistent=false&broker.useJmx=false");
CamelContext camelContext = super.createCamelContext();
SjmsComponent component = new SjmsComponent();
component.setConnectionFactory(connectionFactory);
camelContext.addComponent("sjms", component);
return camelContext;
}
use of org.apache.activemq.ActiveMQConnectionFactory in project camel by apache.
the class SimpleJms2ComponentTest method createRouteBuilder.
@Override
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
public void configure() {
ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("vm://broker?broker.persistent=false&broker.useJmx=false");
Sjms2Component component = new Sjms2Component();
component.setConnectionFactory(connectionFactory);
getContext().addComponent("sjms2", component);
}
};
}
use of org.apache.activemq.ActiveMQConnectionFactory in project camel by apache.
the class InOnlyTopicDurableConsumerTest method createCamelContext.
/*
* @see org.apache.camel.test.junit4.CamelTestSupport#createCamelContext()
*
* @return
* @throws Exception
*/
@Override
protected CamelContext createCamelContext() throws Exception {
ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(BROKER_URI);
ConnectionFactoryResource connectionResource = new ConnectionFactoryResource();
connectionResource.setConnectionFactory(connectionFactory);
connectionResource.setClientId(CONNECTION_ID);
CamelContext camelContext = super.createCamelContext();
SjmsComponent component = new SjmsComponent();
component.setConnectionResource(connectionResource);
component.setConnectionCount(1);
camelContext.addComponent("sjms", component);
return camelContext;
}
use of org.apache.activemq.ActiveMQConnectionFactory in project camel by apache.
the class SjmsBatchEndpointTest method createCamelContext.
@Override
protected CamelContext createCamelContext() throws Exception {
SimpleRegistry registry = new SimpleRegistry();
registry.put("aggStrategy", AggregationStrategies.groupedExchange());
ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory();
connectionFactory.setBrokerURL(broker.getTcpConnectorUri());
SjmsComponent sjmsComponent = new SjmsComponent();
sjmsComponent.setConnectionFactory(connectionFactory);
SjmsBatchComponent sjmsBatchComponent = new SjmsBatchComponent();
sjmsBatchComponent.setConnectionFactory(connectionFactory);
CamelContext context = new DefaultCamelContext(registry);
context.addComponent("sjms-batch", sjmsBatchComponent);
context.addComponent("sjms", sjmsComponent);
return context;
}
use of org.apache.activemq.ActiveMQConnectionFactory in project camel by apache.
the class AsyncConsumerInOutTest method createCamelContext.
protected CamelContext createCamelContext() throws Exception {
CamelContext camelContext = super.createCamelContext();
camelContext.addComponent("async", new MyAsyncComponent());
ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("vm://broker?broker.persistent=false&broker.useJmx=false");
SjmsComponent component = new SjmsComponent();
component.setConnectionFactory(connectionFactory);
camelContext.addComponent("sjms", component);
return camelContext;
}
Aggregations