1 Reply Latest reply on Dec 31, 2010 12:39 PM by clebert.suconic

    Properly closing connections

    meetoblivion

      If I'm working from a Java SE client, what is the correct way to close a connection?  I keep getting the following in my log file on the server

       

      23:40:40,035 WARN  [org.hornetq.core.protocol.core.impl.RemotingConnectionImpl] Connection failure has been detected: Did not receive ping from /192.168.2.5:57558. It is likely the client has exited or crashed without closing its connection, or the network between the server and client has failed. The connection will now be closed. [code=3]
      23:40:40,035 WARN  [org.hornetq.core.server.impl.ServerSessionImpl] Client connection failed, clearing up resources for session d6296933-1497-11e0-9a97-7e267fc4b0ba
      23:40:40,035 WARN  [org.hornetq.core.server.impl.ServerSessionImpl] Cleared up resources for session d6296933-1497-11e0-9a97-7e267fc4b0ba
      23:40:40,035 WARN  [org.hornetq.core.protocol.core.ServerSessionPacketHandler] Client connection failed, clearing up resources for session d6296933-1497-11e0-9a97-7e267fc4b0ba
      23:40:40,035 WARN  [org.hornetq.core.protocol.core.ServerSessionPacketHandler] Cleared up resources for session d6296933-1497-11e0-9a97-7e267fc4b0ba

       

      Even though I have the following at the end of my code.

       

      producer.close();
              session.close();
              connection.stop();
              initialContext.close();