Re: Custom initialization after startup

2008-01-18 Thread Jonadan
Christopher Schultz-2 wrote: > > This is a self-defeating technique: your threads are not guaranteed to > complete your database configuration before any requests are serviced. > Nop! The embedded DMBS is not designed such crappy way. That's why we need to use specially developed embedded DBMS

Re: Custom initialization after startup

2008-01-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jonadan, Jonadan wrote: | 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

Re: Custom initialization after startup

2008-01-18 Thread Jonadan
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 w

Re: Custom initialization after startup

2008-01-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jonadan, Jonadan wrote: | I need to start database before any servlet gets first request. ~From the servlet specification for ServletContextListener.contextInitialized: " Notification that the web application initialization process is starting. All

Re: Custom initialization after startup

2008-01-18 Thread david delbecq
Jonadan a écrit : Is there any way I can perform custom initialization IMMEDIATELY after Tomcat startup automatically? use lifecycle listener http://tomcat.apache.org/tomcat-5.5-doc/config/engine.html - To start a new topi

RE: Custom initialization after startup

2008-01-17 Thread Jonadan
PS: Yes, it can be done with "ServletContextListener" since we can check whether it is alive or not. However we may not sure whether it is system shutdown or app. shutdown. This is quite tricky. DBMS can use huge heap resources up to over 500GB on larger systems. This can be a problem without kno

RE: Custom initialization after startup

2008-01-17 Thread Jonadan
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

RE: Custom initialization after startup

2008-01-17 Thread Caldarale, Charles R
> 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 attribute deplo