use of org.springframework.jms.support.destination.JndiDestinationResolver in project spring-framework by spring-projects.
the class JmsTemplateTests method createTemplate.
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;
}
Aggregations