RE: tomcat webapp startup order
-Original Message- From: Nencho Lupanov [mailto:[EMAIL PROTECTED] Sent: Friday, May 25, 2007 7:22 AM To: Tomcat Users List Subject: tomcat webapp startup order Hi all, I have vanilla tomcat 5.5 installed. I also have axis2 web application deploying on every startup. the problem is that the axis2 web app needs to read a url from the same tomcat server, only that the server is not yet started because in the same moment is yet deploying the axis2 web app. is there any way to solve/work-around this problem? You can start a thread in the ServletContextListener of the 1st application which allows the application to complete startup from Tomcat's perspective. Then the thread you started can wait / retry until it can read the 2nd URL at which time you can have the thread mark the 1st application as available / ready / whatever. Tim Regards, Nencho - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat webapp startup order
Hi Tim, That's a pretty good idea, Thanks. 2007/5/25, Tim Lucia [EMAIL PROTECTED]: -Original Message- From: Nencho Lupanov [mailto:[EMAIL PROTECTED] Sent: Friday, May 25, 2007 7:22 AM To: Tomcat Users List Subject: tomcat webapp startup order Hi all, I have vanilla tomcat 5.5 installed. I also have axis2 web application deploying on every startup. the problem is that the axis2 web app needs to read a url from the same tomcat server, only that the server is not yet started because in the same moment is yet deploying the axis2 web app. is there any way to solve/work-around this problem? You can start a thread in the ServletContextListener of the 1st application which allows the application to complete startup from Tomcat's perspective. Then the thread you started can wait / retry until it can read the 2nd URL at which time you can have the thread mark the 1st application as available / ready / whatever. Tim Regards, Nencho - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat webapp startup order
Or you can delay your intialization code to the first hit to webapplication (if faisable, using a requestfilter for example). At startup, tomcat won't respond to any request until all webapps have been started, so if filter code is reached, all webapps have been started. En l'instant précis du 25/05/07 13:28, Tim Lucia s'exprimait en ces termes: -Original Message- From: Nencho Lupanov [mailto:[EMAIL PROTECTED] Sent: Friday, May 25, 2007 7:22 AM To: Tomcat Users List Subject: tomcat webapp startup order Hi all, I have vanilla tomcat 5.5 installed. I also have axis2 web application deploying on every startup. the problem is that the axis2 web app needs to read a url from the same tomcat server, only that the server is not yet started because in the same moment is yet deploying the axis2 web app. is there any way to solve/work-around this problem? You can start a thread in the ServletContextListener of the 1st application which allows the application to complete startup from Tomcat's perspective. Then the thread you started can wait / retry until it can read the 2nd URL at which time you can have the thread mark the 1st application as available / ready / whatever. Tim Regards, Nencho - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]