On 8/5/10 3:35 PM, Hamid wrote:
Hi,
I'll try to describe more my issue.
Thanks !
I've implemented a class handler as below :
<snip/>
myConnector.getFilterChain().addLast("codec", new ProtocolCodecFilter(new
MyCodecFactory()));
It's likely that the problem lies into the MyCodecFactory. Everything
else is just plain normal MINA code.
On the console I see that the following logs :
Connection established...
Request sent...
Caught exception - The connection was closed....
BUT my Handler doesn't display anything that means that it has been
called...
It has been called : you got an ExceptionCaught :)
What happens in your case is that the data have been received, but
haven't be processed up to the Handler, because there is a problem in
your decoder.
To give you some clue about whats going on inside MINA when some bytes
are received, here is the path they follow :
server-socket --> Head filter --> ... (as many filter you added in the
chain *before* the ProtocolCodecFilter)... --> ProtocolCodecFilter -->
... Some more filter you may have added)... -> Tail filter --> Handler
In your case, you don't have any filter before or after the codec. It
might be a good idea to add a LoggingFilter before the codec just for
debugging pruposes : you will be able to see that there are some bytes
processed through the MessageReceived chain.
Anyway, in your case, I'm ready to bet a beer that the message get
blocked in the codec and never get through it.
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com