One approach that would work with any app is to use a set of lock files.
Set a lock file say TomcatStart at the beginning of the start script.
Delete it and set a TomcatRun file upon completion of the start script.
Check for the presence of the files in the Java application.
TomcatStart exists: Tomcat is starting hold your horses.
TomcatRun exists: Kill at will.
Neither file exists: Dead already.
You may be able to use some of the existing code in the startup and shutdown
scripts that come with Tomcat.
As for a class to call I do not know but am sure someone on the list will.
Doug
----- Original Message -----
From: "Miguel Correia Ricardo" <[EMAIL PROTECTED]>
To: <users@tomcat.apache.org>
Sent: Thursday, October 19, 2006 12:56 PM
Subject: Stopping Tomcat
Hello,
I'm having problems in stopping Tomcat. More precisely stopping
Tomcat, while is starting. I want to be able to check the status of a
running instance of Tomcat, and be able to wait, before sending the
shutdown command (all this in a Java application), otherwise Tomcat
throws an exception, or sends a message stating that catalina engine
has not started yet. So, my question is, does anyone know some class
that exists in tomcat that enables me to check
it's status?
I would appreciate any help.
Best regards,
Miguel Correia Ricardo
---------------------------------------------------------------------
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]