tomcat-dev mailing list archives

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

I have tested out some code in o.a.c.startup.Bootstrap.main() that finds 
and loads the JDK tools (e.g. javac), loads the JSSE jars in 
"jsse.home", turns on the Java security manager, determines and 
catalina.home dynamically. These steps are currently done by the 
catalina.[sh|bat] scripts.

My goal is to simplify the various Tomcat scripts to the point where all 
they do is invoke a class. In other words, I would like to move all of 
the construction of all sorts of optional system properties, etc. from 
the scripts into Tomcat's main() method. Originally, I had proposed 
using the commons-launcher to do this. However, commons-launcher is adds 
another layer on top of the existing o.a.c.startup.Bootstrap class and 
forks another JVM. This works, but is a bit heavyweight.

I am willing to move the script code into main(). However, there is one 
problem: there are currently 2 sets of startup code. Current Bootstrap 
and BootstrapService both do a lot of the same steps to start Tomcat. 
Before I make any changes to Bootstrap, I would like to propose that we 
  separate out the common methods in Bootstrap and BootstrapService 
(e.g. creating the classloaders, invoking Catalina.start(), etc.).

My hope would be that that Bootstrap.main() could be simplified to do 
the following:

- Set up the shutdown port
- Invoke BootstrapService.start()
- Invoke BootstrapService.stop() when the shutdown port receives a
   shutdown request

I would need Remy's and Pier's help to separate out the BootstrapService 
methods so that they can compile without commons-daemons. I can them 
move Bootstrap to use these methods and move the script code into these 
methods so that both Bootstrap and BootstrapService share these features.

Is anyone interested in pursuing this? If so, let me know. If not (I 
know everyone is busy), then I can leave things the way they are and 
repropose this sometime in the future.

Thanks,

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