At startup, I can check dbms status from ServletContextListener and if not
initiated, I can start as you suggested. It serialize the begining of dbms
startup process which create a bunch of service threads. Then quickly
returns without delaying much time. 

For termination check, it is not clear whether "contextInitialized" is
called once before Tomcat dies. Or can be called a number of times by admin
activities. If this is the case, it will be hard to detect.

Note that "ServletContextEvent" does not provide such information!

Regards.




Christopher Schultz-2 wrote:
> 
> So, this should meet your needs. 
> ...
> Actually, you /don't/ want a separate thread: you want it to happen
> serially, so that nothing else happens during your database
> initialization.
> 
> | The same goes not termination time.
> 
> Again, please read the documentation for ServletContextListener.
> 

-- 
View this message in context: 
http://www.nabble.com/Custom-initialization-after-startup-tp14937407p14957814.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]

Reply via email to