0 Replies Latest reply on Jun 27, 2005 6:48 AM by Chris Mathas

    HELP on org.jboss.mq.SpyJMSException: Connection Failed; - n

    Chris Mathas Newbie

      Hi,

      I have a serious JBOSS JMS problem , as follows: the JMS provider (JBOSS) and a JMS client are running without problems. Now we want to archieve a "hot reconnect", is to say the server reboots the client should wait for it and build a JMS reconnection after server startup is complete. The message consumer is realised as JMS Queue listener extending thread with MessageListener [onMessage()] and ExceptionListener [onExeption()] implementation.

      While the thread is loosing connection, it throws a lot of errors. So far all right. THE RECONNECTION OF THE NEW LISTENER THREAD ALSO SEEMS TO WORK AT THE BEGINNING. But after a certain amount of time after this reconnection there are a lot of errors:

      11:25:07,144 WARN [Connection] Connection failure:
      org.jboss.mq.SpyJMSException: Connection Failed; - nested throwable: (java.io.IO
      Exception: ping timeout.)
      at org.jboss.mq.Connection.asynchFailure(Connection.java:436)
      at org.jboss.mq.Connection$PingTask.run(Connection.java:1385)
      at EDU.oswego.cs.dl.util.concurrent.ClockDaemon$RunLoop.run(ClockDaemon.
      java:364)
      at java.lang.Thread.run(Thread.java:534)
      Caused by: java.io.IOException: ping timeout.
      at org.jboss.mq.Connection$PingTask.run(Connection.java:1377)
      ... 2 more

      I'm sure this is the old thread still acting as - at least - ExceptionListener listener. A little after the JMS communication does not longer work at all.

      My question: does perhaps anyone have experiences in this field!? Within the onException () method I try to handle the JMS connection as follows:

      try {
      mQc.setExceptionListener(null);
      } catch (Exception exc2) { // still empty }

      log.warn("JMS exception ocurred", exc2);
      }

      try {
      mQc.stop();
      } catch (Exception exc2) { // still empty }

      log.warn("JMS exception ocurred", exc2);
      }
      try {
      mQc.close();
      } catch (Exception exc2) { // still empty }

      log.warn("JMS exception ocurred", exc2);
      }

      try {
      mRc.close();
      } catch (Exception exc2) { // still empty }

      log.warn("JMS exception ocurred", exc2);
      }
      try {

      mRc.setMessageListener(null);
      } catch (Exception exc2) { // still empty }

      log.warn("JMS exception ocurred", exc2);
      }


      What else can I do?!? Please help!!!

      Chris