tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Luby <patrick.l...@sun.com>
Subject Re: [PROPOSAL] Have Bootstrap and BootsrapService share startup/shutdown code
Date Thu, 08 Aug 2002 17:02:41 GMT
Costin,

costinm@covalent.net wrote:
> On Thu, 8 Aug 2002, Patrick Luby wrote:
> 
> 
> 
> 
> The way I see it: 
> 
> Bootstrap.java -> creates the classpath for server, creates 
> and load Catalina.java ( using Class.forName() ). No dependency on
> tomcat - except possibly introspection. 
> 
> Catalina.java -> main entry point into tomcat. It will have 
> setXXX methods ( in addition to the CLI ), start(), stop(),
> execute(). That's where I would do all the endoresed, policy
> settings and most of the logic, that's what applications 
> embeding tomcat will use
> 
> All other classes should go to a compat/ directory and maintained
> for backward compat only. The commons-deamon can use introspection to 
> call start()/stop().

Wouldn't commons-daemon also want to use Bootstrap.java's classloader, 
etc. setup? Right now, all of this is buried in main() instead of a 
method that commons-daemon could access.

> 
> Catalina.java will be useable as an ant task ( using execute() 
> and the setters ) and will be useable as an MBean ( using modeler ).
> All things that can be specified via CLI will be setable via
> setters.
> 

Wouldn't we want to put execute() in Bootstrap.java since that is where 
all of the classloader magic is happening?

> Regarding the shutdown port: it is essential for me to make it
> optional ( so that ant can start catalina in process and then _return_ ).
> Ajp13 already implements a shutdown procedure - and I would rather
> use that. In addition JMX can be used to call the stop operation.
> 

I agree. The BootstrapService does this very well. Hence, my proposal to 
share common methods. By sharing start() and stop() logic, 
Bootstrap.java would only need to have a command-line option (e.g. 
-noshutdownport) that bypasses the creation of the shutdown port. Right 
now, Bootstrap.main() has this shutdown port stuff really embedded in there.

Also, my hope is that we can have the shutdown port logic, when it is 
used, happen *before* the server is started so that you don't have to 
wait for the server to fully start before you can shutdown Tomcat.

Patrick

-- 
________________________________________________________________
Patrick Luby                     Email: patrick.luby@sun.com
Sun Microsystems                         Phone: 408-276-7471
901 San Antonio Road, USCA14-303
Palo Alto, CA 94303-4900
________________________________________________________________


--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message