Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@apache.org Received: (qmail 94062 invoked from network); 8 Aug 2002 16:22:06 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 8 Aug 2002 16:22:06 -0000 Received: (qmail 25322 invoked by uid 97); 8 Aug 2002 16:22:26 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-dev@jakarta.apache.org Received: (qmail 25306 invoked by uid 97); 8 Aug 2002 16:22:25 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 25294 invoked by uid 98); 8 Aug 2002 16:22:25 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) Message-ID: <3D529A21.5010504@sun.com> Date: Thu, 08 Aug 2002 09:19:45 -0700 From: Patrick Luby User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.1b) Gecko/20020722 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tomcat Developers List Subject: [PROPOSAL] Have Bootstrap and BootsrapService share startup/shutdown code Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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: For additional commands, e-mail: