The servlet is starting the ConnectionPool in the Init() method?

It may be calling the Init method twice.  Don't know why this might be
happening, but you may try to set a static boolean condition around the
creation of the ConnectionPool and set it to false inside.  That way if it
gets called twice it won't re-run.  I've had to do this inside Init()
methods in WebSphere.


Dodd

----- Original Message -----
From: "Ching-yu Hsueh" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 19, 2002 9:58 AM
Subject: Why web.xml in my application runs twice when use Apache as Web
Server?


> Hi,
>
> I have a servlet to start the ConnectionPool, which I wrote and
> registered it in web.xml of my application. I set the <load-on-startup>.
> So, the ConnectionPool should be started when Tomcat starts.
>
> My question is when Tomcat used as stand-alone, the ConnectionPool
> started once. But when Apache was used as Web Server, the ConnectionPool
> starts twice: once at the time to start Tomcat, the other one at the
> time to start Apache. Therefore, the number of Connections doubled. I
> doubt may be two web servers were used: Tomcat mini Web server and
> Apache Web server. So, I comment out the port 8080 connector in
> server.xml. But ConnectionPool still started twice. It looks like that
> web.xml run twice. Is any one can tell me when use Apache as Web Server
> how can run web.xml only once?
>
> Any help to this question shall be highly appreciated.
>
> Ching-yu Hsueh
>
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to