protected static void sendTextMessage(String destName, String payload) throws JMSException, NamingException {
JMSResourceFactory rf = new JMSResourceFactoryImpl(null, null, null, "tcp://localhost:61623");
Session session = rf.getConnection().createSession(false, Session.AUTO_ACKNOWLEDGE);
MessageProducer p = session.createProducer(rf.lookupDestination(destName));
rf.getConnection().start();
session.run();
p.send(session.createTextMessage(payload));
rf.closeConnection();
}
protected static void sendObjectMessage(String destName, Object payload) throws JMSException, NamingException {