Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 62867 invoked from network); 24 Oct 2007 19:28:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Oct 2007 19:28:08 -0000 Received: (qmail 38151 invoked by uid 500); 24 Oct 2007 19:27:44 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 37735 invoked by uid 500); 24 Oct 2007 19:27:42 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 37724 invoked by uid 99); 24 Oct 2007 19:27:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Oct 2007 12:27:42 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of knst.kolinko@gmail.com designates 64.233.162.236 as permitted sender) Received: from [64.233.162.236] (HELO nz-out-0506.google.com) (64.233.162.236) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Oct 2007 19:27:46 +0000 Received: by nz-out-0506.google.com with SMTP id z6so261360nzd for ; Wed, 24 Oct 2007 12:27:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=RVyGn8Z4D/ls5BraxSapcO+g1PsNr6vVvw5BZkz0gVc=; b=eJJyJtfqe2pbiPEJDPOSPcbQ7wYsFLK/Doroj27XDgwb3kddXik0j5VkeYiQbwyHw7tFE9M48wpSpImiVRc+WmTpcivDsIDL+Lyr6K1Nt/IRUrkzcJrNstK75wMt19qtIhDPQZDZMUAGc6tkp23loSxtSHpqIsuFxGuRzRYsrQQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=QH4Hlg1JRCHMYxpbWq3VwBHR9HYis8P/Jxz6OdcA4Em2GtmxqqsuDUiiKHC8m2VHBb54nhjR6NNyPECJfBc0fJls/W0YPCGKa+fELrgpJh22WQzEIddofJWy2cpBZ6hoFVLGTgQrD1nVdh9hdqOZljysHp4xH6viVhLF8zMogas= Received: by 10.114.76.1 with SMTP id y1mr1038202waa.1193254045031; Wed, 24 Oct 2007 12:27:25 -0700 (PDT) Received: by 10.114.170.6 with HTTP; Wed, 24 Oct 2007 12:27:21 -0700 (PDT) Message-ID: <427155180710241227h3da27a80y2a43aeb6ca924252@mail.gmail.com> Date: Wed, 24 Oct 2007 23:27:21 +0400 From: "Konstantin Kolinko" To: "Tomcat Users List" Subject: Re: Confused about startup In-Reply-To: <28174dd80710240824i7c01e5b7w8306426c065d247@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <28174dd80710240439g17e8e0efj1aa04c7d12898400@mail.gmail.com> <28174dd80710240824i7c01e5b7w8306426c065d247@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org Hi, I can say you a few words about this bootstrap class. I remember how I was proud, when I managed to decypher what it actually does. It was a year ago, but it is still a good memory. ;) It's an excellent piece. I hope that in a while you will be able to share these feelings of joy. In essence, it parses catalina.properties (either the default copy of it, or the one available in the conf folder), sets up a chain of classloaders (see http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html), and starts the server. Most of the work is done through reflection calls. JMX test at the begin of Bootstrap.main() (in tomcat 5.5 only) is required, because JMX is used to manage tomcat instance. Thus there is a quick test, and a message if the test fails. Please note, that catalina.properties specifies patterns, e.g. ${catalina.home}/common/lib/*.jar, but ClassLoader instance requires references to actual jar files, thus some lookup is performed to get the actual names from the pattern. The startup sequence description in http://tomcat.apache.org/tomcat-5.5-doc/architecture/startup/serverStartup.txt is correct. It is not a simple matter though. The comment for Bootstrap.main( ) is, well, misleading. Both in 5.5.25 and 6.0.14 sources. Should someone provide a patch for this? Actually, the Bootstrap class is not so important. The more important class is org.apache.catalina.startup.Catalina, and its main(args) method is commented as being the entry point. 2007/10/24, Lyallex : > Hmm, obviously this was "not an acceptable question" ... shame. > > Still, I have now managed to get 5.5.25 to build and run and when I > put some simple debug in Bootstrap.main() it does indeed appear that > this method is being called. > > Still slightly confused as to why this method is commented as > > /** > * Main method, used for testing only. > * > * @param args Command line arguments to be processed > */ > > Ah well, it's all character building stuff I suppose. > > On 10/24/07, Lyallex wrote: > > Hello > > > > Windows XP SP2 > > Java 1.5.0_10 > > Tomcat 5.5.25 > > > > After many years using Tomcat to host various web sites I thought it > > was about time I started looking at some of the code. I downloaded the > > source for 5.5.25 and thought I'd start at the beginning and figure > > out what happens when I start the server from the command line.. > > After deciphering the batch files (catalina.bat, startup.bat and > > setclasspath.bat) I figured out that the class being invoked was > > org.apache.catalina.startup.Bootstrap with the command line param > > start ... Well that's about as far as I get because I just can't > > figure out the entry point. I know that an instance of > > org.apache.catalina.startup.Catalina is being instantiated and invoked > > eventually but the main method in Bootstrap is apparently only used > > for testing. > > At least that what he comments state ... but main must be being called > > mustn't it ... If main is not being called in Bootstrap how do things > > kick off... I'm a bit distressed that I can't figure this out. I > > haven't got around to building the distribution yet. > > > > I've read http://tomcat.apache.org/tomcat-5.5-doc/architecture/startup/serverStartup.txt > > but I'm still at a loss, maybe I'm getting too old for all this or > > maybe I'm just tired ... > > > > Thanks > > > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > > --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org