You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by suchitha koneru <su...@gmail.com> on 2007/06/30 01:05:52 UTC

order of web app initialization.

Hello Tomcat users ,
          Iam using Tomcat 5.520 . I have three web application contexts
Context A, B and C. I  have a requirement because of which Context A should
start Before B and C. All the web applications contexts are  placed as WARS
 under Tomcat/webapps.
How can we indicate the order in which Tomcat should start the web apps ? is
there any configuration file for specifying the order of context
initialization. What is teh default order which tomcat uses to start the web
apps ?
Please let me know.
thanks,
Suchitha.

Re: order of web app initialization.

Posted by David Smith <dn...@cornell.edu>.
There is no guarantee of any order in initializing contexts.  You would 
better spend your time designing webapps B and C to deal with the 
possibility webapp A isn't running.  Or at least design them to deal 
with the possibility that they may start out of order.

This has also been answered on the list before and always with the 
answer given above.

--David


suchitha koneru wrote:
> Hello Tomcat users ,
>          Iam using Tomcat 5.520 . I have three web application contexts
> Context A, B and C. I  have a requirement because of which Context A 
> should
> start Before B and C. All the web applications contexts are  placed as 
> WARS
> under Tomcat/webapps.
> How can we indicate the order in which Tomcat should start the web 
> apps ? is
> there any configuration file for specifying the order of context
> initialization. What is teh default order which tomcat uses to start 
> the web
> apps ?
> Please let me know.
> thanks,
> Suchitha.
>


---------------------------------------------------------------------
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


RE: order of web app initialization.

Posted by Tim Lucia <ti...@yahoo.com>.

> -----Original Message-----
> From: Johnny Kewl [mailto:john@kewlstuff.co.za]
> Sent: Saturday, June 30, 2007 7:57 AM
> To: Tomcat Users List
> Subject: Re: order of web app initialization.
> 
> 
> These TC designers seem to have though of everything
> See
> <load-on-startup>1</load-on-startup>
> 
> The <load-on-startup> sub-element indicates the order in which each
> servlet
> should be loaded. Lower positive values are loaded first. If the value is
> negative or unspecified, then the container can load the servlet at
> anytime
> during startup.
> 
> otherwise they will init, only on a request
> 

The above is certainly true, however it is not relevant to the original post
-- which questions the context startup order, not the servlet startup order.
This will allow servlets to start in the order specified but not different
contexts.

The only thing you can do for dependent contexts is to code them so they can
survive out of order.  ServletContextListener is one of the tools in your
toolbox.  Be sure not to block therein, however.

See here: http://www.mail-archive.com/users@tomcat.apache.org/msg29127.html

Tim


> 
> ----- Original Message -----
> From: "suchitha koneru" <su...@gmail.com>
> To: "Tomcat Users List" <us...@tomcat.apache.org>
> Sent: Saturday, June 30, 2007 1:05 AM
> Subject: order of web app initialization.
> 
> 
> > Hello Tomcat users ,
> >          Iam using Tomcat 5.520 . I have three web application contexts
> > Context A, B and C. I  have a requirement because of which Context A
> > should
> > start Before B and C. All the web applications contexts are  placed as
> > WARS
> > under Tomcat/webapps.
> > How can we indicate the order in which Tomcat should start the web
> apps ?
> > is
> > there any configuration file for specifying the order of context
> > initialization. What is teh default order which tomcat uses to start the
> > web
> > apps ?
> > Please let me know.
> > thanks,
> > Suchitha.
> >
> 
> 
> ---------------------------------------------------------------------
> 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


Re: order of web app initialization.

Posted by Johnny Kewl <jo...@kewlstuff.co.za>.
These TC designers seem to have though of everything
See
<load-on-startup>1</load-on-startup>

The <load-on-startup> sub-element indicates the order in which each servlet 
should be loaded. Lower positive values are loaded first. If the value is 
negative or unspecified, then the container can load the servlet at anytime 
during startup.

otherwise they will init, only on a request


----- Original Message ----- 
From: "suchitha koneru" <su...@gmail.com>
To: "Tomcat Users List" <us...@tomcat.apache.org>
Sent: Saturday, June 30, 2007 1:05 AM
Subject: order of web app initialization.


> Hello Tomcat users ,
>          Iam using Tomcat 5.520 . I have three web application contexts
> Context A, B and C. I  have a requirement because of which Context A 
> should
> start Before B and C. All the web applications contexts are  placed as 
> WARS
> under Tomcat/webapps.
> How can we indicate the order in which Tomcat should start the web apps ? 
> is
> there any configuration file for specifying the order of context
> initialization. What is teh default order which tomcat uses to start the 
> web
> apps ?
> Please let me know.
> thanks,
> Suchitha.
> 


---------------------------------------------------------------------
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