You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Alex Karasulu <ao...@bellsouth.net> on 2006/01/18 04:03:21 UTC

[ApacheDS] [MINA] Twix throws triggers call to IoHandler.messageCaught()?

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()?

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?

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?

Alex


Re: [ApacheDS] [MINA] Twix throws triggers call to IoHandler.messageCaught()?

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

2006/1/18, Alex Karasulu <ao...@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