}
protected static void sendObjectMessage(String destName, Object 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.createObjectMessage((Serializable)payload));
rf.closeConnection();
}