Search in sources :

Example 1 with JndiDestinationResolver

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;
}
Also used : Context(javax.naming.Context) JndiTemplate(org.springframework.jndi.JndiTemplate) JndiDestinationResolver(org.springframework.jms.support.destination.JndiDestinationResolver)

Aggregations

Context (javax.naming.Context)1 JndiDestinationResolver (org.springframework.jms.support.destination.JndiDestinationResolver)1 JndiTemplate (org.springframework.jndi.JndiTemplate)1