tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Santosh Asbe <santosh.a...@gmail.com>
Subject Re: classloader during tomcat startup
Date Wed, 19 Oct 2005 04:40:15 GMT
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 <delbd@oma.be> 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 écrit :
>
> >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 lib
> >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
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message