I've been working on a class that will start and stop Tomcat from via a JMenu
item. It seems I have tomcat starting correctly with the following code: 

        class StartListener implements ActionListener {
                public void actionPerformed(ActionEvent event) {
                        try {
                        
bootStrap.setCatalinaHome("C:\\Varin\\Java_Dev\\Servers\\Tomcat\\apache-tomcat-5.5.20");
                                bootStrap.start();
                        } catch (Throwable e ) {
                                System.out.println("Unable to start Tomcat");
                                e.printStackTrace();
                                return;
                        }
                        System.out.println("Tomcat Started...");
                }
        } //End Class SaveAsListener




...and I'm using the following to stop the Tomcat instance: 

        class StopListener implements ActionListener {
                public void actionPerformed(ActionEvent event) {
                        try {
                                bootStrap.stop();
                                bootStrap.destroy();
                        } catch (Throwable e ) {
                                System.out.println("Unable to stop Tomcat");
                                e.printStackTrace();
                                return;
                        }
                        System.out.println("Tomcat stopped...");
                }
        } //End Class SaveAsListener




The issue that I am having is that when I select the "start" a second time
Tomcat does not seem to start. Also, when I select "stop" and then hit the
Tomcat server I receive a "503" message as opposed to a "server not found".
So, this leads me to believe that the server is in fact not actually
stopping. 


The documentation is really spartan in this area so, I took a look at the
source for Bootstrap...there is a "destroy" method that according to the
javadoc is supposed to end the daemon but, it has a single comment in it
with no body that just says "fix me". So, I'm thinking maybe there really is
no way to bring the daemon down so that it can be recycled. 

Any help would be appreciated. 

Fran

-- 
View this message in context: 
http://www.nabble.com/Bootstrap-stop%28%29-tf3296281.html#a9169712
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to