String compositeQueue = "compositeA,compositeB";
ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("vm://localhost");
JmsTemplate jt = new JmsTemplate(cf);
jt.send(compositeQueue, new MessageCreator() {
public Message createMessage(Session session) throws JMSException {
TextMessage tm = session.createTextMessage();
tm.setText("test");
return tm;
}
});
jt.send("noCompositeA", new MessageCreator() {
public Message createMessage(Session session) throws JMSException {
TextMessage tm = session.createTextMessage();
tm.setText("test");
return tm;
}
});
jt.send("noCompositeB", new MessageCreator() {
public Message createMessage(Session session) throws JMSException {
TextMessage tm = session.createTextMessage();
tm.setText("test");
return tm;
}