ServerManagement.deployQueue("MyQueue2");
// send a message to the queue
ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
Queue queue = (Queue)initialContext.lookup("queue/MyQueue2");
Connection conn = cf.createConnection();
Session s = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
MessageProducer p = s.createProducer(queue);
p.setDeliveryMode(DeliveryMode.PERSISTENT);
Message m = s.createTextMessage("one");