public void testDurableSubscriptionOnNewTopic() throws Exception
{
ServerManagement.deployTopic("CompletelyNewTopic");
ConnectionFactory cf = (ConnectionFactory)ic.lookup("ConnectionFactory");
Topic topic = (Topic)ic.lookup("/topic/CompletelyNewTopic");
Connection conn = cf.createConnection();
conn.setClientID("brookeburke");
Session s = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
MessageProducer prod = s.createProducer(topic);
prod.setDeliveryMode(DeliveryMode.PERSISTENT);
s.createDurableSubscriber(topic, "monicabelucci");
prod.send(s.createTextMessage("one"));
conn.close();
ServerManagement.deployTopic("CompletelyNewTopic2");
Topic topic2 = (Topic)ic.lookup("/topic/CompletelyNewTopic2");
conn = cf.createConnection();
conn.setClientID("brookeburke");
s = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);