You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by afa654321 <af...@yahoo.com> on 2007/01/17 20:18:40 UTC

Detecting server shutdown

Hello,

We have got a MINA-based client-server which we're interested in detecting a
server shutdown(e.g., crash) on
the client side.

I did the following test:

Bring up server & client
client goes into a loop & keeps sending requests to the server
shutdown server

At this point I can't figure out how to detect that the server has gone
down(since no exception is thrown from "session.write(...)" mehtod in the
client & "sessionClosed(...)" or "exceptionCaught(...)" of the "IoHandler"
interface are not invoked.


Any ideas?

Thx.
-- 
View this message in context: http://www.nabble.com/Detecting-server-shutdown-tf3029276.html#a8416977
Sent from the mina dev mailing list archive at Nabble.com.


Re: Detecting server shutdown

Posted by Trustin Lee <tr...@gmail.com>.
Hello,

On 1/18/07, afa654321 <af...@yahoo.com> wrote:
>
>
> Hello,
>
> We have got a MINA-based client-server which we're interested in detecting
> a
> server shutdown(e.g., crash) on
> the client side.
>
> I did the following test:
>
> Bring up server & client
> client goes into a loop & keeps sending requests to the server
> shutdown server
>
> At this point I can't figure out how to detect that the server has gone
> down(since no exception is thrown from "session.write(...)" mehtod in the
> client & "sessionClosed(...)" or "exceptionCaught(...)" of the "IoHandler"
> interface are not invoked.


It's weird.  If a connection is closed somehow, you will get notified at
least when you try to write something to the closed connection.  Could you
give us the full thread dump of that moment?  Is there any exception thrown
and logged out to stderr?

Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP key fingerprints:
* E167 E6AF E73A CBCE EE41  4A29 544D DE48 FE95 4E7E
* B693 628E 6047 4F8F CFA4  455E 1C62 A7DC 0255 ECA6