You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by mat <fo...@gmail.com> on 2007/04/11 17:10:00 UTC
MessageDecoder
Hi,
If something wrong in the MessageDecoder decodeBody(unexpected exception
happened with no handling by programmer), what will mina do? Automatically
close the session?
Thanks.
Re: MessageDecoder
Posted by Trustin Lee <tr...@gmail.com>.
On 4/16/07, mat <fo...@gmail.com> wrote:
> Thanks. My question is if it happens, will mina close the session?
No, it won't. MINA closes the connection only when IOException is
raised during I/O.
HTH,
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6
Re: MessageDecoder
Posted by mat <fo...@gmail.com>.
Thanks. My question is if it happens, will mina close the session?
2007/4/12, Trustin Lee <tr...@gmail.com>:
>
> On 4/12/07, mat <fo...@gmail.com> wrote:
> > Hi,
> >
> > If something wrong in the MessageDecoder decodeBody(unexpected exception
> > happened with no handling by programmer), what will mina do?
> Automatically
> > close the session?
>
> MINA will wrap the exception with ProtocolDecoderException, and throw
> it. If the exception is already a ProtocolDecoderException so it
> doesn't need to be wrapped with ProtocolDecoderException, it will be
> thrown as is.
>
> HTH,
> Trustin
> --
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> --
> PGP Key ID: 0x0255ECA6
>
Re: MessageDecoder
Posted by Trustin Lee <tr...@gmail.com>.
On 4/12/07, mat <fo...@gmail.com> wrote:
> Hi,
>
> If something wrong in the MessageDecoder decodeBody(unexpected exception
> happened with no handling by programmer), what will mina do? Automatically
> close the session?
MINA will wrap the exception with ProtocolDecoderException, and throw
it. If the exception is already a ProtocolDecoderException so it
doesn't need to be wrapped with ProtocolDecoderException, it will be
thrown as is.
HTH,
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6