org.springframework.jms.support.destination.JndiDestinationResolver Java Examples

The following examples show how to use org.springframework.jms.support.destination.JndiDestinationResolver. 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: JmsTemplateTests.java    From spring-analysis-note with MIT License 5 votes vote down vote up
private JmsTemplate createTemplate() {
	JmsTemplate template = new JmsTemplate();
	JndiDestinationResolver destMan = new JndiDestinationResolver();
	destMan.setJndiTemplate(new JndiTemplate() {
		@Override
		protected Context createInitialContext() {
			return JmsTemplateTests.this.jndiContext;
		}
	});
	template.setDestinationResolver(destMan);
	template.setSessionTransacted(useTransactedTemplate());
	return template;
}
 
Example #2
Source File: JmsTemplateTests.java    From java-technology-stack with MIT License 5 votes vote down vote up
private JmsTemplate createTemplate() {
	JmsTemplate template = new JmsTemplate();
	JndiDestinationResolver destMan = new JndiDestinationResolver();
	destMan.setJndiTemplate(new JndiTemplate() {
		@Override
		protected Context createInitialContext() {
			return JmsTemplateTests.this.jndiContext;
		}
	});
	template.setDestinationResolver(destMan);
	template.setSessionTransacted(useTransactedTemplate());
	return template;
}
 
Example #3
Source File: JmsTemplateTests.java    From spring4-understanding with Apache License 2.0 5 votes vote down vote up
private JmsTemplate createTemplate() {
	JmsTemplate template = new JmsTemplate();
	JndiDestinationResolver destMan = new JndiDestinationResolver();
	destMan.setJndiTemplate(new JndiTemplate() {
		@Override
		protected Context createInitialContext() {
			return jndiContext;
		}
	});
	template.setDestinationResolver(destMan);
	template.setSessionTransacted(useTransactedTemplate());
	return template;
}
 
Example #4
Source File: JndiConsumerConfiguration.java    From solace-samples-cloudfoundry-java with Apache License 2.0 5 votes vote down vote up
@Bean
public JndiDestinationResolver consumerJndiDestinationResolver() {
	JndiDestinationResolver jdr = new JndiDestinationResolver();
    jdr.setCache(true);
    jdr.setJndiTemplate(jndiTemplate);
    return jdr;
}
 
Example #5
Source File: JndiProducerConfiguration.java    From solace-jms-spring-boot with Apache License 2.0 4 votes vote down vote up
private JndiDestinationResolver producerJndiDestinationResolver() {
	JndiDestinationResolver jdr = new JndiDestinationResolver();
    jdr.setCache(true);
    jdr.setJndiTemplate(jndiTemplate);
    return jdr;
}
 
Example #6
Source File: JndiConsumerConfiguration.java    From solace-jms-spring-boot with Apache License 2.0 4 votes vote down vote up
private JndiDestinationResolver consumerJndiDestinationResolver() {
	JndiDestinationResolver jdr = new JndiDestinationResolver();
    jdr.setCache(true);
    jdr.setJndiTemplate(jndiTemplate);
    return jdr;
}
 
Example #7
Source File: JndiProducerConfiguration.java    From solace-samples-cloudfoundry-java with Apache License 2.0 4 votes vote down vote up
public JndiDestinationResolver producerJndiDestinationResolver() {
	JndiDestinationResolver jdr = new JndiDestinationResolver();
    jdr.setCache(true);
    jdr.setJndiTemplate(jndiTemplate);
    return jdr;
}