You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Wendy Smoak <We...@asu.edu> on 2003/12/17 16:19:53 UTC

Okay to create threads in ServletContextListener?

I'm getting complaints that Tomcat takes for-ev-er to start up, and the
thing that's taking so long is all my ServletContextListeners (one for
each webapp) going out to the database and loading a bunch of Maps into
application scope.  Later, those get used to populate select lists.

Not that we restart Tomcat very often, but when we do, it causes
problems when Tomcat doesn't completely finish starting before Apache
starts.  We end up restarting them twice to get all the generated config
files in place.

Is it going to break anything if I let life go on with the rest of the
startup while some threads wait for the information from the database?
(I haven't done much concurrent programming, just a few tutorials and
school assignments, so stop me now if this is a really bad idea.)

-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org