Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 5436 invoked from network); 19 Oct 2005 04:40:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 19 Oct 2005 04:40:55 -0000 Received: (qmail 23580 invoked by uid 500); 19 Oct 2005 04:40:40 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 23566 invoked by uid 500); 19 Oct 2005 04:40:39 -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 23555 invoked by uid 99); 19 Oct 2005 04:40:39 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Oct 2005 21:40:39 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of santosh.asbe@gmail.com designates 72.14.204.202 as permitted sender) Received: from [72.14.204.202] (HELO qproxy.gmail.com) (72.14.204.202) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Oct 2005 21:40:37 -0700 Received: by qproxy.gmail.com with SMTP id e11so3690qbe for ; Tue, 18 Oct 2005 21:40:15 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=XG38vZ7zHvlg+BLHiazdOV2tWd48bkNJakUKp2VnkC6tVnmkEb0V98hhrXOv8rj3p1dqpwWDGzuuITld0dcQ02QmVBsittejVBwu6SsefrhJAbdx7y/NOv12a/vTmscCNcOWQE1LbQbFcAOwYw+EcQBRl2cFz9gzyG6w2gry5wc= Received: by 10.65.242.2 with SMTP id u2mr162489qbr; Tue, 18 Oct 2005 21:40:15 -0700 (PDT) Received: by 10.64.201.4 with HTTP; Tue, 18 Oct 2005 21:40:15 -0700 (PDT) Message-ID: <505d17640510182140u38d48741u48a6d79f51fd0eb8@mail.gmail.com> Date: Wed, 19 Oct 2005 10:10:15 +0530 From: Santosh Asbe To: Tomcat Users List Subject: Re: classloader during tomcat startup In-Reply-To: <43549E79.6010705@oma.be> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_14412_22906648.1129696815838" References: <505d17640510172115vf3d0583y205f367cee1f621e@mail.gmail.com> <43549E79.6010705@oma.be> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_14412_22906648.1129696815838 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, further to our discussion, can i specifically load a class during startup= ? Is i possible in tomcat? Where is the clasloader hierachy and details placed?? Santosh On 10/18/05, David Delbecq wrote: > > I don't know from the details of tomcat implementation, but i'll response > using common sense and from my experience. > > Tomcat loads all .jar descriptor at webapp startup so it know which .jar > contains > which class. But it does not load the .class binary content; > Each time a class is required, a Class is request to classloader by jvm. > If this is first time classloader has to return the Class, it initialize > it. > > So static block is run at first time class is requested. > > This is common sense as it prevents initialising classes you never use > in your library. > > David Delbecq > > Santosh Asbe a =E9crit : > > >Hi all, > > I have couple of questions regarding tomcat startup > >1)when the tomcat is started , does it load all the jar file from its li= b > >and create a object of all the classes? > >2) if there is a static block in one of the classes , when will it > >execute..during startup or when first call is made > > Santosh > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > > ------=_Part_14412_22906648.1129696815838--