tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: load-on-startup and multiple coyotes
Date Tue, 02 Dec 2003 17:32:21 GMT

> As soon as I start using 2 coyote connectors together with <load-on-startup>
> tomcat initializes the database pools twice.
> Interestingly it keeps initializing things twice even if I add a third
> coyote.

In about two minutes, Yoav Shapira is going to tell you this:

"Don't use a servlet to initialize your stuff. Instead, use a 
ContextListener. IT's cleaner, more flexible, and only gets loaded when 
it should get loaded."

I used to have InitServlet-style initialization, but now I use 

They're pretty easy: create a new class that implements 

Once you move your code from your old InitServlet, you have to install 
it into the web.xml file like this:


Put this section right before any <servlet> definitions but after any 
<filter> and <filter-mapping> sections you have.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message