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 files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. ----- Original Message ----- From: "Peter Bauer" <[EMAIL PROTECTED]> To: <users@tomcat.apache.org> Sent: Sunday, September 03, 2006 10:01 AM Subject: Aborting servlet init() method > Hi all, > > i have the following problem here: > If the used database is not available at startup of the servlet, the > initialization should be aborted and the servlet should be in a > stopped state to be able to start it again if the database is > available again. > Waiting for the database is not an option since some processes will be > left running when tomcat is stopped without a working database. > So my question is how a servlet can be stopped from within the > servlet? Throw some kind of exception? > > thx, > Peter > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >