It may be better to move the startup code to a ServletContextListener.
When a ServletContextLister fails on startup - then the webapp is
unavailable.
When the webapp is unavailable - any HTTP based monitoring tool would
pick that up (due the error page returned)
-Tim
Yaar Schnitman wrote:
Martin,
Martin Gainty wrote:
Yaar-
try
init()
{
try
{
//code here
}
catch(Exception excp)
{
System.exec(/PATH/TO/JAKARTA/bin/shutdown.sh);
}
}
OMG I'm going to vomit. At least you could have used System.exit().
Please, everyone, never do anything like this.
-chris
Yaar Schnitman ha scritto:
Is there a way to make the failure of a single servlet's initialization
stop the initialization of the other servlets, or even stop tomcat with
an error?
I can't reproduce always the error but some time ago I had a servlet
that builds a bitmap (Mac OS X, Tomcat
Administrator
Freshwater Publishing
269-704-8113
-Original Message-
From: Edoardo Panfili [mailto:[EMAIL PROTECTED]
Sent: Friday, November 03, 2006 9:50 AM
To: Tomcat Users List
Subject: Re: Could a bad servlet initializtion stop tomcat?
Yaar Schnitman ha scritto:
Is there a way to make
]
To: Tomcat Users List users@tomcat.apache.org
Sent: Friday, November 03, 2006 9:56 AM
Subject: RE: Could a bad servlet initializtion stop tomcat?
Thanks for the input. Something I forgot to mention. My CTO built a
custom App in java. That's why we need tomcat. I believe he did all
his programming
Is there a way to make the failure of a single servlet's initialization
stop the initialization of the other servlets, or even stop tomcat with
an error?
The issue is that my system operators fail to notice initialization errors.
@tomcat.apache.org
Sent: Thursday, November 02, 2006 5:24 PM
Subject: Could a bad servlet initializtion stop tomcat?
Is there a way to make the failure of a single servlet's initialization
stop the initialization of the other servlets, or even stop tomcat with
an error?
The issue is that my system
A lot of things are possible.
I'm sure a context could fail to start because of bad code. Even seen
it happen once or twice.
The whole container? I'll say possible, but the code would have to do
some really terrible things. I can't see it happening by accident unless
you call System.exit()