public void sendMessage(String text) throws JmsException {
JmsTemplate template = new JmsTemplate(connectionFactory);
template.setPubSubDomain(true);
template.convertAndSend("myTopic", text);
}
protected void setUp() throws Exception {
applicationContext = new ClassPathXmlApplicationContext(getSpringConfig());
connectionFactory = (ConnectionFactory) applicationContext.getBean("jmsFactory");