Hi Haviv,

On 3/26/07, Haviv <[EMAIL PROTECTED]> wrote:
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 ?

CumulativeProtocolDecoder doesn't need to synchronize anything because
ExecutorFilter guarantees that only one event per session is processed
at the same time.

Did wrapping the code with the synchronized block fix your problem?
Could you provide us that reproduces the problem so we can make sure
if it is really a bug of CumulativeProtocolDecoder before blindly
applying your fix?

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

Reply via email to