use of org.springframework.jms.core.JmsTemplate in project camel by apache.
the class JmsConfiguration method configureMessageListener.
public void configureMessageListener(EndpointMessageListener listener) {
if (isDisableReplyTo()) {
listener.setDisableReplyTo(true);
}
if (isEagerLoadingOfProperties()) {
listener.setEagerLoadingOfProperties(true);
}
if (getReplyTo() != null) {
listener.setReplyToDestination(getReplyTo());
}
JmsOperations operations = listener.getTemplate();
if (operations instanceof JmsTemplate) {
JmsTemplate template = (JmsTemplate) operations;
template.setDeliveryPersistent(isReplyToDeliveryPersistent());
}
}
use of org.springframework.jms.core.JmsTemplate in project camel by apache.
the class ConsumeJmsMapMessageTest 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 org.springframework.jms.core.JmsTemplate in project camel by apache.
the class ConsumeJmsObjectMessageTest 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 org.springframework.jms.core.JmsTemplate 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 org.springframework.jms.core.JmsTemplate in project camel by apache.
the class JmsEndpointConfigurationTest method testReplyToPesistentDelivery.
@Test
public void testReplyToPesistentDelivery() throws Exception {
JmsEndpoint endpoint = resolveMandatoryEndpoint("jms:queue:Foo", JmsEndpoint.class);
endpoint.getConfiguration().setDeliveryPersistent(true);
endpoint.getConfiguration().setReplyToDeliveryPersistent(false);
Producer producer = endpoint.createProducer();
assertNotNull("The producer should not be null", producer);
JmsConsumer consumer = endpoint.createConsumer(dummyProcessor);
JmsOperations operations = consumer.getEndpointMessageListener().getTemplate();
assertTrue(operations instanceof JmsTemplate);
JmsTemplate template = (JmsTemplate) operations;
assertTrue("Wrong delivery mode on reply template; expected " + " DeliveryMode.NON_PERSISTENT but was DeliveryMode.PERSISTENT", template.getDeliveryMode() == DeliveryMode.NON_PERSISTENT);
}
Aggregations