I am using a durableSubscriber with JBoss Messaging.  After running for a while 
and publishing to topics and retrieving them with the durableSubscriber I get 
the following error:

java.io.IOException: Can not find a free port for use.

I am not sure why I am getting this, I am pretty sure I am closing the 
connections after I check to see if there are new messages.  I can run for 
about 50 receiveNoWait calls before it dies:

InitialContext iniCtx = new InitialContext();
  | Object tmp = iniCtx.lookup("/ConnectionFactory");
  | TopicConnectionFactory tcf = (TopicConnectionFactory) tmp;
  | TopicConnection conn = tcf.createTopicConnection("testuser", 
"testpassword");
  | conn.setClientID("testclient");
  | TopicSession session = 
conn.createTopicSession(false,TopicSession.AUTO_ACKNOWLEDGE);
  | Topic topic = (Topic) iniCtx.lookup("topic/someTopic");
  |                     
  | conn.start();
  | TopicSubscriber topicSubscriber = session.createDurableSubscriber(topic, 
"testclient");
  |                     
  | System.out.println("starting close topic: " + topicName);
  | TextMessage tm = (TextMessage) topicSubscriber.receiveNoWait();
  | topicSubscriber.close();
  | conn.stop();
  | session.close();
  | conn.close();
  | iniCtx.close();
  | conn = null;

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3952181#3952181

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3952181


_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to