On Thu, 27 Feb 2003, Will Hartung wrote:
> Date: Thu, 27 Feb 2003 14:00:03 -0800 > From: Will Hartung <[EMAIL PROTECTED]> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]> > To: Tomcat Users List <[EMAIL PROTECTED]> > Subject: Re: startup order for applications > > > From: "Ben Souther" <[EMAIL PROTECTED]> > > Sent: Thursday, February 27, 2003 12:54 PM > > Subject: startup order for applications > > > I've got two applcations. The first is an Axis webservice application and > > the second is a servelet/jsp app that consumes services from the first. > > > > I would like to configure the JSP app to make a webservice call to get > > initialization params on startup. In order to do this, I need to insure > > that the webservice app is up and running before the JSP app starts. > > Hmm...that's a bugger. You can't listen for the socket of the webservice, as > it may not come up until after your dependent app is finished initializing. > > You can't "wait" for the other application, as if it's the first one to > start up, it will block and the second webapp may never get a chance to > initialize. > > Have you tried to see if the placement of the contexts within the server.xml > is deterministic? i.e. The first context always starts before the next, or > vice-a-versa? You might be able to glean some information from the source > code about startup order. > > I doubt there is any way to ensure the startup order of arbitrarily placed > webapps in the webapp directory. Those may be "auto-deployed" and > initialized in the order they appear within the directory, which is > internally unsorted and should be considered arbitrary. > > There isn't any portable way of ensuring webapp start up order, that I'm > aware of at least. > > Let us know what works for you. > We ran into a similar situation with the Java Web Services Developer Pack (JWSDP), where a particular webapp had to be started, and available for HTTP requests, before a second one. The answer was to set up two <Service> elements, because Tomcat does guarantee that Services will be initialized in the order they are listed. For details, you can download JWSDP and examine the server.xml file. http://java.sun.com/webservices/ > Regards, > > Will Hartung Craig --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
