Re: Aborting servlet init() method

2006-09-05 Thread David Smith
I was looking at this very recently. If the init() method throws a javax.servlet.UnavailableException(), it will be marked as unavailable. Take a look at the javadocs -- one invocation of this exception takes a time param that tells tomcat to try again after a set timeout period. That way it

Re: Aborting servlet init() method

2006-09-04 Thread Len Popp
If I understand the situation correctly, You could use a filter to deny all requests to the servlet (return HTTP error 500) while the database is down. On initialization you check the database and set a flag to tell the filter if the database is down. When the database comes back up (assuming you

Re: Aborting servlet init() method

2006-09-03 Thread Martin Gainty
Runtime.getRuntime().exit(n) But this will exit TOMCAT as well as the VM.. perhaps you can make a startup script which checks for the desired process and then forks depending on found process M- * This email message and any file