5 Replies Latest reply on Feb 18, 2009 7:46 AM by Carlos Bolaños

    Network Failure undetected - Linux

    Carlos Bolaños Newbie

      Good morning, I have developed a JMS system. These are their main properties:

      Jboss Messaging 1.4.0 SP3
      Jboss Remoting 1.2.2 sp7
      Jboss AS 4.2.2.GA
      Linux debian 4

      In a Jboss server there is a Queue, with a MDB listener on it, and a topic. When the MDB receives a message, pass it to the topic after processing it.

      I have serveral clients who send messages to the remote Queue and receive messages from the topic, because all of them have a durable suscription.



      This is the code of the JMS Client durable suscription

      ...
      //Remote connections
      AVMain.controller.updateProgressAction(35, "Starting Remote Connections...");
      ic2 = new InitialContext();
      AVMain.controller.updateProgressAction(45);
      ConnectionFactory cf2= null;
      cf2 = (ConnectionFactory)ic2.lookup(jndiConnectionFactory);
      AVMain.controller.printLog("Found remote context: " + ic2.getEnvironment().get(ic2.PROVIDER_URL));
      connection2 = cf2.createConnection(jmsUser, jmsPwd);
      AVMain.controller.updateProgressAction(55);
      AVMain.controller.printLog("JMS connection 2 created " + " of type " + connection2.getClass().getName());
      
      ave = new AVExceptionListener();
      //Obligatorio indicar clientid para poder crear una durable suscription
      connection2.setClientID(clientId);
      AVMain.controller.printLog("Client id " + clientId + "established");
      
      connection2.setExceptionListener(ave);
      session2 = connection2.createSession(false, Session.AUTO_ACKNOWLEDGE);
      AVMain.controller.updateProgressAction(60);
      AVMain.controller.printLog("Session2 created auto ack and without transatcions");
      
      


      My problem is that in Linux enviroment, the client doesn't detect network failure (e.g if I disconect eth wire), however in Windows enviroment it does because the ExceptionListener throws an ConnectException. I've read a lot of configuring timeouts, keep alives, but i can't find the solution.

      Please, could anyone help me.

      Thank you for your great job.

      Regards.