Haviv wrote:
Hi Trustin,
Where in the code you see that "ExecutorFilter ensures that two threads
don't handle the same session".
You have said that before and I didn't understand it.
Looking at the ExecutorFilter(version 1.0.1) fireEvent method :
private void fireEvent(...)
{
Event event = new Event( type, nextFilter, data );
SessionBuffer buf = SessionBuffer.getSessionBuffer( session );
synchronized( buf.eventQueue )
{
buf.eventQueue.add( event );
if( buf.processingCompleted )
{
buf.processingCompleted = false;
if ( logger.isDebugEnabled() ) {
logger.debug( "Launching thread for " +
session.getRemoteAddress() );
}
executor.execute( new ProcessEventsRunnable( buf ) );
}
}
}
There is a synch part but it synchronizes the executor.execute method(which
just adds the ProcessEventsRunnable to its workQueue) and not the execution
of the ProcessEventsRunnable itself.
Am I missing something ?
Hi Haviv.
Look at ProcessEventsRunnable class. It process event in sequence. Look
at ExecutorFilter fireEvent() method. It ensures that only one
ProcessEventRunnable instance can be executed by executor for one session.
Did you applay patches from http://tinyurl.com/2gldgx ? Did you check if
this solves your issue?
Regards, Marcin