directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trustin Lee <trus...@gmail.com>
Subject Re: [ApacheDS] [MINA] Twix throws triggers call to IoHandler.messageCaught()?
Date Wed, 18 Jan 2006 03:22:40 GMT
Hi Alex,

2006/1/18, Alex Karasulu <aok123@bellsouth.net>:
>
> Hi Emmanuel, Trustin,
>
> I guess this is both informative and a question at the same time.
> Basically Twix or any codec must throw a DecoderException or something
> like that if it fails to decode some PDU from a client regardless of the
> protocol.  Now when this happens does the IoHandler get called via
> messageCaught()?


Yes, you're supposed to get ProtocolDecoderException which wraps the
original exception.

Also note Emmanuel that when you throw these exceptions I intend to
> catch them there and send a Notice of Disconnect with result code set to
> protocolError to the client before closing the session.  This cool?


Cool. :)

Also while talking about the Notice of Disconnect unsolicited operation,
> I will register a JVM shutdown hook in the protocol handler.  In this I
> will send a NoD to all active sessions and close them.  The result code
> will be set to unavailable.  What do you think about using a shutdown
> hook for this?


I think shutdown hook which takes too long is sometimes stopped before it
completes.  You'll have to do it when you unbind service.

HTH,
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/
PGP Key ID: 0x854B996C

Mime
View raw message