tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Lucia" <timlu...@yahoo.com>
Subject RE: Tomcat does not stop if the deployment fails
Date Tue, 24 Apr 2007 11:06:33 GMT
You can't, and generally don't want to stop Tomcat (the server) when an
application is mis-configured.  Instead, you can stop (mark unavailable)
your application.  One way to do this is to throw an exception inside a
ServletContextListener, if it detects wrong values inside the configuration
file:

SEVERE: Exception sending context initialized event to listener instance of 
class  tim.lucia.ApplicationLifecycleListener

java.lang.RuntimeException: Bad Configuration at 
tim.lucia.ApplicationLifecycleListener.contextInitialized(ApplicationLifecyc
leListener.java:24)

Tim


> -----Original Message-----
> From: padam chhetri [mailto:hello_padam@yahoo.com]
> Sent: Tuesday, April 24, 2007 2:27 AM
> To: users@tomcat.apache.org
> Subject: Tomcat does not stop if the deployment fails
> 
> Hi All,
> 
> I need to stop the tomcat gracefully(not manually) if the deployment of my
> web application fails.
>   The scenario is this my web application has configuration file if I
> enter the
> wrong values in the file then the deployment of my appplication fails but
> the Tomcat starts up successfully .But at this point I want Tomcat also to
> stop
> instead of starting up successfully
>   Thanks in advance
> 
> 
>   Pam
> 
> 
> ---------------------------------
> Ahhh...imagining that irresistible "new car" smell?
>  Check outnew cars at Yahoo! Autos.



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


Mime
View raw message