Hi, Adrian The ping timeout happened again after 30 hours' stress testing (routing 120 messages/second). But this time, i got more information.
In the following, i list the output of log.error(...) and System.out.println(...). (1) "init() return successfully" is the output of init() method. Once a new connection is established, it is printed. (2)Here, you can see there are two "init() return successfully". The first one is printed when i started the stress testing and the second one is printed by the init() method which is invoked in the onException() method. (3)The disconnection of the old connection is not returned because no information is printed (pls read the disconnection codes). (4)On the whole, one new connection is established. so the stress testing can continue. :). But i am not sure whether the hang of the disconnection of the old connection will introduce other potential problem. (5)This time, you lost the bet :) :). I guess the problem is that the jms provider(JbossMQ) closed the connection before it invoke the onException() method. By the way, what is the exact meaning of "ping timeout"? I think the best solution is to find out why "ping timeout" happened? Regards yang -----------------------output of log.error and System.out.println()-------------------- [java] .init() return successfully [java] org.jboss.mq.SpyJMSException: Connection Failed; - nested throwable: (java.io.IOException: ping timeout.) [java] onException() is called at Sat Apr 17 06:30:54 SGT 2004 [java] at org.jboss.mq.Connection.asynchFailure(Connection.java:718) [java] at org.jboss.mq.Connection$PingTask.run(Connection.java:1311) [java] at EDU.oswego.cs.dl.util.concurrent.ClockDaemon$RunLoop.run(ClockDaemon.java:364) [java] at java.lang.Thread.run(Thread.java:534) [java] Caused by: java.io.IOException: ping timeout. [java] at org.jboss.mq.Connection$PingTask.run(Connection.java:1303) [java] ... 2 more [java] init() return successfully ------------------------onExceptoin() method----------------------------------------------- public synchronized void onException(JMSException jmsException) { log.error("onException() is called at " + new Date()); System.out.println("onException() is called at " + new Date()); jmsException.printStackTrace(); oldconnection = queueConnection; boolean reconnection = false; retry : for (int i = 0; i < 10; i++) { try { C2SConnectorMessageListener.this.init(); reconnection = true; break retry; } catch (Exception e2) { log.error("reconnection failed"); System.out.println("reconnection failed"); try { log.error("sleep for 2 seconds and try reconnect again"); Thread.sleep(2000); } catch (InterruptedException e1) { e1.printStackTrace(); } } } if (!reconnection) { System.out.println("RECONNECTION FAILED"); log.error("RECONNECTION FAILED"); System.exit(1); } Thread disconnThread = new Thread() { public void run() { try { if (oldconnection != null) { oldconnection.close(); oldconnection = null; } log.debug("close the old connection success"); System.out.println("close the old connection success"); return; } catch (Exception e) { log.error("disconnect the old connection failed"); } } }; disconnThread.start(); } View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3831143#3831143 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3831143 ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user