use of org.springframework.jms.core.JmsOperations 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.JmsOperations in project camel by apache.
the class JmsEndpoint method getTemporaryQueueType.
/**
* Lazily loads the temporary queue type if one has not been explicitly configured
* via calling the {@link JmsProviderMetadata#setTemporaryQueueType(Class)}
* on the {@link #getConfiguration()} instance
*/
public Class<? extends TemporaryQueue> getTemporaryQueueType() {
JmsProviderMetadata metadata = getProviderMetadata();
JmsOperations template = getMetadataJmsOperations();
return metadata.getTemporaryQueueType(template);
}
use of org.springframework.jms.core.JmsOperations in project camel by apache.
the class JmsEndpoint method getTemporaryTopicType.
/**
* Lazily loads the temporary topic type if one has not been explicitly configured
* via calling the {@link JmsProviderMetadata#setTemporaryTopicType(Class)}
* on the {@link #getConfiguration()} instance
*/
public Class<? extends TemporaryTopic> getTemporaryTopicType() {
JmsOperations template = getMetadataJmsOperations();
JmsProviderMetadata metadata = getProviderMetadata();
return metadata.getTemporaryTopicType(template);
}
use of org.springframework.jms.core.JmsOperations 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);
}
use of org.springframework.jms.core.JmsOperations in project camel by apache.
the class JmsQueueEndpoint method getExchanges.
public List<Exchange> getExchanges() {
if (queueBrowseStrategy == null) {
return Collections.emptyList();
}
String queue = getDestinationName();
JmsOperations template = getConfiguration().createInOnlyTemplate(this, false, queue);
return queueBrowseStrategy.browse(template, queue, this);
}
Aggregations