Hi,
I am working on MINA 1.0.1 , using a custom ProtocolDecoder which extends
the CumulativeProtocolDecoder.
I am also using an ExecutorFilter in front of the ProtocolCodecFilter -
meaning that my ProtocolDecoder runs
multi threaded.
Recently under Heavy load I have encountered some strange errors - my
received messages got corrupted.
After looking at the CumulativeProtocolDecoder - I was wondering why there
isn't any synchronization block
on CumulativeProtocolDecoder.decode method which can prevent this kind of
behavior ?
I am meaning something like :
public void decode(IoSession session, ByteBuffer in,ProtocolDecoderOutput
out) throws Exception {
synchronized (session) {
...
...
...
}
}
After all there is a call to the flip method(from
CumulativeProtocolDecoder.decode) which reset the position,
while other threads may be doing the doDecode stuff - using the buffer
position.
Thanks,
Haviv
--
View this message in context:
http://www.nabble.com/CumulativeProtocolDecoder-BUG---tf3466819.html#a9672586
Sent from the mina dev mailing list archive at Nabble.com.