Java Code Examples for org.springframework.jms.core.JmsTemplate#setDestinationResolver()

The following examples show how to use org.springframework.jms.core.JmsTemplate#setDestinationResolver() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JndiProducerConfiguration.java    From solace-jms-spring-boot with Apache License 2.0 5 votes vote down vote up
@Bean
public JmsTemplate producerJmsTemplate() {
	JmsTemplate jt = new JmsTemplate(producerCachingConnectionFactory());
	jt.setDeliveryPersistent(true);
	jt.setDestinationResolver(producerJndiDestinationResolver());
	return jt;
}
 
Example 2
Source File: JndiProducerConfiguration.java    From solace-samples-cloudfoundry-java with Apache License 2.0 5 votes vote down vote up
@Bean
public JmsTemplate producerJmsTemplate() {
	JmsTemplate jt = new JmsTemplate(cachingConnectionFactory());
	jt.setDeliveryPersistent(true);
	jt.setDestinationResolver(producerJndiDestinationResolver());
	jt.setPubSubDomain(true);	// This sample is publishing to topics
	return jt;
}
 
Example 3
Source File: ArtemisConfig.java    From dhis2-core with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Bean
public JmsTemplate jmsTopicTemplate( ConnectionFactory connectionFactory, NameDestinationResolver nameDestinationResolver )
{
    JmsTemplate template = new JmsTemplate( connectionFactory );
    template.setDeliveryMode( DeliveryMode.NON_PERSISTENT );
    template.setDestinationResolver( nameDestinationResolver );
    // set to true, since we only use topics and we want to resolve names to topic destination
    template.setPubSubDomain( true );

    return template;
}
 
Example 4
Source File: ArtemisConfig.java    From dhis2-core with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Bean
public JmsTemplate jmsQueueTemplate( ConnectionFactory connectionFactory, NameDestinationResolver nameDestinationResolver )
{
    JmsTemplate template = new JmsTemplate( connectionFactory );
    template.setDeliveryMode( DeliveryMode.PERSISTENT );
    template.setDestinationResolver( nameDestinationResolver );
    template.setPubSubDomain( false );

    return template;
}