geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruce Snyder <>
Subject Re: Proposal: Change the way interceptors are stacked
Date Mon, 24 Nov 2003 02:42:32 GMT
This one time, at band camp, David Blevins said:

DB>On Sun, Nov 23, 2003 at 05:47:40PM -0800, Jeremy Boynes wrote:
DB>> Currently the interceptor stack is built from the front backwards using 
DB>> the addInterceptor method on the container.
DB>> I would like to propose we change to build the stack in the opposite 
DB>> order, from the back forward. This would allow us to make the next 
DB>> interceptor a private final initialized in the Interceptor's 
DB>> constructor. It also makes multi-headed interceptor chains easier to 
DB>> understand which will help with OpenEJB integration, and simplifies the 
DB>> code in the containers that builds the stacks.
DB>I'll note for others reading that with the current front-back (first-last) style of
building the stack makes it impossible to add another interceptor later -- it would actually
end up after the "final" interceptor in the chain and would never be invoked.  Putting the
final/end interceptor in the stack first allows you to keep adding interceptors in front of

Dain and I were talking about this at ApacheCon. I'm considering adding
an interceptor stack to Castor JDO for various reasons. One of those
reasons is the need to change the stack on the fly. But I'm not sure
if I understand how switching the order of the stack would allow this
to happen?

perl -e 'print unpack("u30","<0G)U8V4\@4VYY9&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'

The Castor Project

Apache Geronimo

View raw message