tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Annie Wang <lunab...@gmail.com>
Subject Re: question about load-on-startup in web.xml
Date Wed, 11 May 2005 22:46:52 GMT
i tried putting in a sleep in my servlet's init method, but
$CATALINA_HOME/logs/catalina.out seems to indicate that tomcat waits
for it to initalize..

in my catalina.out, i have:

May 11, 2005 2:12:06 PM org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path /webappX from URL
file:/jakarta-tomcat/webapps/webappX
***webappX***start init
***webappX***end init
May 11, 2005 2:12:06 PM org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path /webappY from URL
file:/jakarta-tomcat/webapps/webappY

any one know if there's a way to make webappY get installed before
webappX?  what determines the install order?  i thought it was
load-on-startup in the web.xml file, but maybe that affects the
ordering of servlet initalization within a web application (if the web
application has multiple servlets), but not the ordering of web
application installation on tomcat startup.

thanks.
-annie


On 5/10/05, Annie Wang <lunabear@gmail.com> wrote:
> hi doug, yup, was thinking along similar lines.  just wasn't sure if
> there was some setting i wasn't aware of to do what i'm looking for.
> 
> thanks.
> -annie
> 
> On 5/10/05, Parsons Technical Services <parsonstechnical@earthlink.net> wrote:
> > I may be off base on this one but I think that once Tomcat fires off the
> > init method it doesn't care or monitor the progress of the servlet. Just
> > think, some servlets may take several minutes to finish. If other apps had
> > to wait then it could take a long time to get the server started.
> >
> > Now as for a solution I am really speculating here (hopefully someone can
> > educate both of us). I would look at a wait statement in the init method to
> > pause the second app's servlet until the first one is done. Simply time the
> > first app's servlet and set it for a little more.
> >
> > Hopefully someone will set me straight if I am off base here.
> >
> > Doug
> >
> > ----- Original Message -----
> > From: "Annie Wang" <lunabear@gmail.com>
> > To: <tomcat-user@jakarta.apache.org>
> > Sent: Tuesday, May 10, 2005 6:59 PM
> > Subject: question about load-on-startup in web.xml
> >
> > hi,
> >
> > regarding the <load-on-startup> tag in web.xml:
> >
> > say i have 2 web apps (webapp1 and webapp2).  if i configure webapp1's
> > servlet to have <load-on-startup>1</load-on-startup> and webapp2's
> > servlet to have <load-on-startup>100</load-on-startup>, does this mean
> > that tomcat will init webapp1's servlet first and once that's done,
> > it'll init webapp2's servlet?
> >
> > basically, i want both web app's servlets to auto initialize on tomcat
> > startup, but i want webapp2's servlet to initialze only after
> > webapp1's servlet has finished initialization.  when i use the above
> > load-on-startup settings, webapp2's servlet seems to initialize before
> > webapp1's servlet has finished initialization.
> >
> > thanks.
> > -annie
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message