1 Reply Latest reply on Jan 17, 2005 4:01 PM by Adrian Brock

    exceptionlistener on old connection stays alive

    henk s Newbie

      Hi,

      I have an exceptionlistener like this :

      if ((ex.getLinkedException() instanceof java.io.EOFException) || (ex.getLinkedException() instanceof IOException)) {
      try {
       connection.setExceptionListener(null);
       session.close();
       connection.close();
      } catch (JMSException e) {
       e.printStackTrace();
      }
      wait(60000);
      reconnect();
      


      It works, the connection is again made after stopping jboss. BUT, I still get exceptions from the old exceptionlistener :
      org.jboss.mq.SpyJMSException: Connection Failed; - nested throwable: (java.io.IOException: ping timeout.)

      Is there a thread somewhere still pinging ? How can I stop it ?
      Also, the connection.close() gives me an exception because I am not connected (obviously).

      can someone help me with this ?

      Henk