On 8/7/07, Gohan <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> When implementing a subclass of IoHandlerAdapter, is sessionClosed(..)
> always called even after exceptionCaught(..) has been called? The reason I'm
> asking is because I wonder if I have to call my "cleanup" method in both
> sessionClosed(..) and exceptionCaught(..) or if it's enough to just call it
> in sessionClosed(..).

If the caught exception is an IOException, the connection is closed
automatically, and consequently, sessionClosed() will be invoked.

Otherwise, you could call session.close() in exceptionCaught().

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

Reply via email to