tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Raymond Kroeker" <>
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


On Tue, Jul 22, 2008 at 05:38, Ken Bowen <> 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:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message