I debug the source code and find it's SessionBuffer  to maintain the order  ,
and i find one connection with one thread for handler (Thread
[pool-4-thread-4] ).  Is this right?



Trustin Lee wrote:
> 
> On 10/23/07, tiandike <[EMAIL PROTECTED]> wrote:
>>
>> in the source code of ExecutorFilter:
>> in function messageReceived : it call  fireEvent function.
>> this function  call  executor.execute(new ProcessEventsRunnable(buf));
>>
>> it will config multithread to execute the run function .
>>
>> in the run function of ProcessEventsRunnable  it call
>>
>> processEvent(event.getNextFilter(), buffer.session, event
>>                         .getType(), event.getData());
>>
>> in processEvent the code include
>> nextFilter.messageReceived(session, data);
>>
>> at last it will call the handler messageReceived.
>>
>> as you see processEvent is executed in multithread ,how to ensure "the
>> corresponding
>> IoHandler.messageReceived events will be called in the same order on the
>> server."??
> 
> As you see from the source code, there's an event buffer per session
> that maintains the message order.
> 
> HTH,
> Trustin
> -- 
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> --
> PGP Key ID: 0x0255ECA6
> 
> 

-- 
View this message in context: 
http://www.nabble.com/why-client-received-message-in-order--tf4668688s16868.html#a13400188
Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.

Reply via email to