1 Reply Latest reply on Sep 18, 2006 9:56 AM by Tom Elrod

    Figuring out when a connection is established again?

    saravanan c Newbie

      hi all,

      In my application, I have a network of systems that communicate with each other using Remoting. I have one server connector and multiple client connectors (one for each of the other peer systems) on every system.

      When I create a client connector, I provide a connection listener to be notified when the connection is lost. I do get the notification when the one of the systems goes down.

      How do I get a notification when the connection is available again? I did not see any call back or listener mechanism to get notified when the connection is established again.

      Thanks
      Saravanan

        • 1. Re: Figuring out when a connection is established again?
          Tom Elrod Master

          Generally speaking, there is no reliable way to determine that the connection has been re-established. A connection failure indicates the server has failed (either due to network problem, software or hardware failure, etc.). Depending on which transport being used (i.e. socket invoker), would be possible to re-connect once the server came back up, but only way to do this would be to continue to try sending invocations (if does not fail, then server back up).

          Probably the best way to approach this is to use remoting detection (see http://labs.jboss.com/portal/jbossremoting/docs/guide/ch05.html#d0e853). This will allow you to receive a notification when the server comes back online and then know is safe to use that server again.