Re: How to cancel a servlet startup?

2009-11-12 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dan, On 11/12/2009 11:47 AM, Dan Armbrust wrote: > How can I make tomcat cancel the deployment of the entire war file > that this servlet was distributed with? By the time the servlets are started, the context (webapp) has already started up, though

RE: How to cancel a servlet startup?

2009-11-12 Thread Joseph Morgan
OK... now you're asking for miracles! You need to write "us...@miracleworkers.com" har de har! -Original Message- From: Dan Armbrust [mailto:daniel.armbrust.l...@gmail.com] Sent: Thursday, November 12, 2009 12:08 PM To: Tomcat Users List Subject: Re: How to cancel a

RE: How to cancel a servlet startup?

2009-11-12 Thread Joseph Morgan
ve no control over that? If so, maybe a system level monitor to shut down the context if the startup fails. -Original Message- From: Dan Armbrust [mailto:daniel.armbrust.l...@gmail.com] Sent: Thursday, November 12, 2009 1:18 PM To: Tomcat Users List Subject: Re: How to cancel a servlet st

Re: How to cancel a servlet startup?

2009-11-12 Thread Dan Armbrust
Thanks for all the tips. I'll have to put something together with a filter. Just wanted to make sure there wasn't an easier way that I was missing. Dan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additiona

Re: How to cancel a servlet startup?

2009-11-12 Thread Tim Funk
I'll one up it to make it trivial ... // put this in a filter mapped to everything doFilter(...) { if (servletContext.getAttribute("initFailed")) { response.sendError(503); return; } chain.doFilter(request,response); } // and put this in any servlet or listerer } catch(Throwable e)

Re: How to cancel a servlet startup?

2009-11-12 Thread Mark Thomas
Dan Armbrust wrote: > I'll tell you what, if you can tell me how to prevent my users (who > have full control over the application / installation / hardware where > this is running) from being able to shoot themselves in the foot and > do something that causes my app to fail - I'll buy you a case o

Re: How to cancel a servlet startup?

2009-11-12 Thread Kris Schneider
>From a spec perspective, you're only guaranteed that the specific servlet that throws an exception from its init method will be taken out of service, not the entire app. One possibility might be to do the system checks in a ServletContextListener and then have a Filter operate on every request, in

Re: How to cancel a servlet startup?

2009-11-12 Thread Dan Armbrust
I'll tell you what, if you can tell me how to prevent my users (who have full control over the application / installation / hardware where this is running) from being able to shoot themselves in the foot and do something that causes my app to fail - I'll buy you a case of beer and not worry about t

RE: How to cancel a servlet startup?

2009-11-12 Thread Joseph Morgan
Dan, Pardon my advice, but... this sounds like a programming/config/illegal state error that shouldn't make it to production. Of course, you could simply add instrumentation to the system to detect that this servlet didn't do its thing, and route every request to a holding page. Joe -Orig