users@glassfish.java.net

How can a standalone application client check its connection to the server

From: <forums_at_java.net>
Date: Thu, 25 Oct 2012 12:27:27 -0500 (CDT)

Hi there, I have written a standalone application client (java webstart),
which connects to a server to communicate with session beans via RMI / IIOP
and to receive JMS messages. It can be launched here:
http://www.dlsc.com:9080/collapp/ The client sometimes looses its connection
to the server. This might be because of a network issue or because the laptop
went into sleep mode. So this is normal. The client eventually reconnects to
the server by itself. The problem I am having is that the user does not
understand what is going on, why there is a delay. Can anyone tell me how I
can check whether the connection to the server is still up and running ? I am
assuming that there are different things that need to be done to check the
RMI connection and to check the JMS connection. Is there any way I can hook
into the JMS machinery on the client to see its status (connected,
reconnecting, disconnected)? How do I check the RMI connection? A simple
socket check? Any help much appreciated. --Dirk

--
[Message sent by forum member 'dlemmermann']
View Post: http://forums.java.net/node/891774