Thanks Rusty.

I was hoping for a 'Java' solution ( as in 'OS independent').
The daemon is a java application (actually the activemq JMS broker);

Is there a way for me to have org.apache.catalina.startup.Bootstrap
block till it receives a JMS notification or some such? The desired
startup sequence would be (chronologically):

   Time 0: Start activemq broker
   Time t1: Broker operational - open for service
   Time t1 + 1: Start tomcat6

Thanks,

/U



 -------------- Original message ----------------------
From: Rusty Wright <rusty.wri...@gmail.com>
> Too many bins; I meant /tmp/zzz (as it is in the script).
> 
> Rusty Wright wrote:
> > What options are available to you to determine if the daemon is ready?  
> > For example, does it create a lock file?  If so, you could modify your 
> > tomcat startup script in /etc/init.d, the one that calls 
> > /usr/local/tomcat/bin/startup.sh, and have it check if the daemon is 
> > ready and wait until it is, then when it is proceed and start tomcat.
> > 
> > For example, here's a little /bin/sh script that waits for the file 
> > /bin/zzz to be created and sleeps 5 seconds and keeps checking:
> > 
> > while test ! -f /tmp/zzz
> > do
> >    echo "sleeping for 5 seconds"
> >    /bin/sleep 5
> > done
> > 
> > echo "here we go"
> > 
> > 
> > uma...@comcast.net wrote:
> >> I am using Tomcat6.0.14 with Jdk1.6 on Linux RH4.
> >>
> >> My application comprises a daemon and Tomcat6. The daemon is slow in 
> >> starting up. I need Tomcat6 to be started after the daemon is 
> >> operational. While the daemon is a Java application, its a third-party 
> >> tool whose src I do not control.
> >> Is there any mechanism within Tomcat configuration by which I could
> >> implement this "chaining" or synchronization such that catalina.sh starts
> >> Tomcat VM after the daemon is somehow determined to be active?
> >>
> >> Tx, - U
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> >> For additional commands, e-mail: users-h...@tomcat.apache.org
> >>
> >> From - Sat
> >>   
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to