I need to start database before any servlet gets first request. So immediately after server start, initialize embedded database and make it ready for incomming first requests, of course, in a separate thread.
The same goes not termination time. I need to have control passed immediately after all working servelts destroyed so that I can terminate database system NORMALLY! Currently it dies suddenly with Tomcat and every new starts starts with emergency recovery! Smooth normal shutdown is preferred. Regards. Caldarale, Charles R wrote: > >> From: Jonadan [mailto:[EMAIL PROTECTED] >> Subject: Custom initialization after startup >> >> Is there any way I can perform custom initialization >> IMMEDIATELY after Tomcat startup automatically? > > Depends on what you mean by IMMEDIATELY. You'll at least need to insure > that the <Host> attribute deployOnStartup is true (it is by default), > and that you implement a ServletContextListener for each webapp of > interest. Read section 10 of the servlet spec for details of the > latter. > -- View this message in context: http://www.nabble.com/Custom-initialization-after-startup-tp14937407p14947102.html Sent from the Tomcat - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]