2005/11/17, Jose Alberto Fernandez <[EMAIL PROTECTED]>:
My only point here is that caching NextFilter per se is useless.
I originally thought we were caching NextFilter because we will not have
a seesion to obtain it from. (That was my lala-land).

You're right.  Caching is not the point.  Look at this example:

NextFilter nextFilter = session.getIoFilterChain().getNextFilter( this ); // --- (1)
nextFilter.exceptionCaught( session, new ResponseTimeoutException() ); // --- (2)

If the reference of the nextFilter of 'this' changes internally between (1) and (2), this code won't work.  We cannot simply wrap this code with synchronized block because it is very unconvenient.  So the reference should never change whenever getNextFilter() is invoked.  That's my point.

I think all of us understood your and my point, so we can let Dave implement his great idea. :)

Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/

Reply via email to