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 Re: Problem with current mechanism for initialization of Contexts
Date Wed, 01 Mar 2000 02:06:23 GMT
The problem stated below appears to be caused because initURLs() is
called inside of the 'addContext' method.

A possible solution could be to move the initURL() call to the
engineInit() portion (getting the contexts from the ContextManager).

This, since 'engineInit()' is invoked from the ContextManager.init()
method.

Arieh

> Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm
> X-No-Archive: yes
> list-help: <mailto:tomcat-dev-help@jakarta.apache.org>
> list-unsubscribe: <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
> list-post: <mailto:tomcat-dev@jakarta.apache.org>
> Delivered-To: mailing list tomcat-dev@jakarta.apache.org
> From: Arieh Markel <Arieh.Markel@central.sun.com>
> Subject: Problem with current mechanism for initialization of Contexts
> To: tomcat-dev@jakarta.apache.org
> Content-MD5: 1AtK0fj7sLCe9A2LnCAVrw==
> X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N
> 
> 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
> ContextManager,
> 
> Only after the replacement, do I call the ContextManager.init() method.
> 
> ---
> 
> Execution tracing indicates the following:
> 
>   DefaultCMSetter.java 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
>   location. 
>   
> ---
> 
> Example:
> 
> 
>    <Context path="" docBase="console" debug="1" reloadable="true" />        
>    <Context path="/services" docBase="services" debug="1" reloadable="true" />
> 
> The docBase is transformed to be:
> 
> 	/etc/opt/SUNWesm/www/console
> and
> 	/etc/opt/SUNWesm/www/services
> 	
> 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 ?
> 
> Thanks,
> 
> Arieh
> --
>  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)
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org

--
 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)


Mime
View raw message