Return to Snippet

Revision: 4760
at January 19, 2008 15:13 by narkisr


Initial Code
public void sendJMS() {
        ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("spring-config.xml");
        JmsTemplate jmsTemplate = (JmsTemplate) applicationContext.getBean("jmsTemplate");
        jmsTemplate.send(new MessageCreator() {
            public Message createMessage(Session session) throws JMSException {
                return session.createTextMessage("hello queue world");
            }
        });
    }

Initial URL

                                

Initial Description
A simple usage example

Initial Title
Simple JMS template usage example

Initial Tags

                                

Initial Language
Java