tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Where should LoadOnStartupInterceptor go in server.xml
Date Tue, 12 Sep 2000 18:24:41 GMT
LoadOnStartup must be called after everything is set up - so probably
making it LAST ( or AT_END ) is a good idea.

A good ( global ) solution is to finally implement the hook chains as in
Apache or NES - instead of using the order of interceptors from the config
file for all hook chains ( or "chains of responsibility" ), we can either
use Apache or NES style.

Apache: individual interceptor[] for each callback, init() method in
interceptor will call addHook() for all chains the interceptor is
interested in. We'll pass a parameter ( FIRST, BEGIN, MIDDLE, END, LAST
plus BEFORE and AFTER) to specify where to insert the interceptor.

NES: for each chain we explicitely define the order of calling the
interceptors. Each interceptor will have an id, and we add at config
time a new tag:
<HOOK name="requestMap" order="...."/>

( that will also solve the non-problem of empty method calls :-)

Larry - let's first try the simple solution ( moving LoadOnStartup at
end) - but for 3.3 it's a good idea to start thinking about this. 


> Yoshiyuki Karezaki's patch for Bug 103 reveals that LoadOnStartupInterceptor is making
a "cm.service( request, response )" call in loadJsp() before any RequestInterceptors are initialized.
 Removing the request.getSession(true) call avoids an error hitting the StandardSessionInterceptor
before it is ready, but should the LoadOnStartupInterceptor be moved to be last to allow all
other interceptors to initialize first?  Would this the correct thing to do or would there
be other side effects?

View raw message