[jboss-user] [JBoss Messaging] - Re: subscription & client id: does not allow dots
sergeypk
do-not-reply at jboss.com
Tue Jul 3 07:22:56 EDT 2007
I have trouble coming up with a failing test for this. This is what I tried (and it passed):
| public void testDurableSubscriptionWithPeriodsInName() throws Exception
| {
| ConnectionFactory cf = (ConnectionFactory)ic.lookup("ConnectionFactory");
| Topic topic = (Topic)ic.lookup("/topic/Topic");
|
| Connection conn = cf.createConnection();
| conn.setClientID(".client.id.with.periods.");
|
| Session s = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
|
| TopicSubscriber subscriber = s.createDurableSubscriber(topic, ".subscription.name.with.periods.");
|
| s.createProducer(topic).send(s.createTextMessage("Subscription test"));
|
| conn.start();
|
| Message m = subscriber.receive(1000L);
|
| assertNotNull(m);
| assertTrue(m instanceof TextMessage);
|
| subscriber.close();
|
| s.unsubscribe(".subscription.name.with.periods.");
|
| conn.close();
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4059880#4059880
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4059880
More information about the jboss-user
mailing list