tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Raymond Kroeker" <raym...@raykroeker.com>
Subject Re: Graceful exit from AppListener
Date Tue, 22 Jul 2008 16:25:07 GMT
Hi Ken,
  I use a very similar approach in my applications; and my answer was
to subclass Error with ConfigurationError and throw it when I realize
I cannot initialize completely.   This will prevent your application
from servicing requests; as well as play nicely within the container
(tomcat).

Raymond

On Tue, Jul 22, 2008 at 05:38, Ken Bowen <kbowen@als.com> wrote:
> Hi All,
>
> My app does some significant initialization in the class AppListener
> implements ServletContextListener,
> including processing the application configuration.  When it receives an
> inconsistent, unrecoverable configuration,
> what is the best way to exit from contextInitialized(...)  and gracefully
> exit from the app without hurting Tomcat or
> other apps? ( Clearly not System.exit() ).
>
> Thanks,
> Ken



-- 
---------------------------------------------------------
Raymond Kroeker

---------------------------------------------------------------------
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