Using auto_acknowledage mode create connection both on client and server side.
The similar codes are blow:
| TopicConnectionFactory topicFactory = (TopicConnectionFactory)
ContextUtil.getContext() .lookup("ConnectionFactory");
| topicConn = topicFactory.createTopicConnection();
| //set connection exceptionlistener
| topicConn.setExceptionListener(new ExceptionListenerImpl());
|
| topicSession = topicConn.createTopicSession(false,Session.AUTO_ACKNOWLEDGE);
|
| channels = MsgRouterController.getInstance().findAllChannel();
|
| topicPublishers = new TopicPublisher[channels.length];
| for (int i = 0; i < topicPublishers.length; i++) {
| Topic topic = (Topic)
ContextUtil.getContext().lookup(Const.Topic_Prefix+ channels);
| topicPublishers = topicSession.createPublisher(topic);
| log.debug("topicPublisher "+channels+" created!");
| }
if there is one client block receive jms due to network problem,I think the
server should not block all receivers and senders.
My problem is waiting on socketwrite(),and blocking others thread to receive
msg or send msg.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4191588#4191588
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4191588
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user