tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arieh Markel <Arieh.Mar...@Central.Sun.COM>
Subject Problem with current mechanism for initialization of Contexts
Date Wed, 01 Mar 2000 01:57:40 GMT
I have begun the task of migrating from shell/Startup style
to startup/Tomcat style initialization.

The problem I am trying to resolve is as follows:

   . The DocBase for my contexts needs to be determined at run-time
My solution involves parsing the server.xml file, and then replacing
the DocBase of the various contexts, as well as the 'home' for the

Only after the replacement, do I call the ContextManager.init() method.


Execution tracing indicates the following: tries to add the context after the XML handling,
  prior to init.
  However, this gets done before the DocBase has been modified. In the
  addContext, the existence of WEB-INF/classes is checked.
  In our deployment, the docBase stated in the web.xml is a temporary one
  that has the 'true' docRoot prepended to it, to form the run-time


   <Context path="" docBase="console" debug="1" reloadable="true" />        
   <Context path="/services" docBase="services" debug="1" reloadable="true" />

The docBase is transformed to be:

at invocation time depending on a command-line switch.


With the current implementation, the check for existence of the in
DefaultCMSetter needs to be delayed until the invocation of the
ContextManager init method.

In essence, the mechanism does not account for the possibility of
setting the docbase on the context to something other than what was
found on the server.xml.


I have the impression that other implementors may run into similar problems.


Any ideas of how to smartly split the process ?


 Arieh Markel		                Sun Microsystems Inc.
 Network Storage                        500 Eldorado Blvd. MS UBRM11-194
 e-mail: arieh.markel@sun.COM           Broomfield, CO 80021
 Let's go Panthers !!!!                 Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)

View raw message