IF, and a big one at that, the only reason, in this case, that this is needed is the connection pool how about the JNDI for the connection pool?
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/jndi-resources-howto.html
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-resources-howto.html
Just a thought.
Doug
----- Original Message ----- From: "Larry Isaacs" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Thursday, February 19, 2004 1:06 PM
Subject: RE: Servlet won't run init()
-----Original Message----- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Thursday, February 19, 2004 12:47 PM To: Tomcat Users List Subject: RE: Servlet won't run init()
Howdy,
I tried overriding init() and super.init(SerlvetConfig cf)
as 1st line
of init(ServletConfig cf) but neither worked.
Strange. Any errors in your logs?
I was thinnking that I should use the init() method appraoch
becasue it
is a connectionpool and I want to initially build the pool before the application starts to use connections. In this case is
ServletContext
Listener appropriate?
Yeah, a ServletContextListener is better because: - It will be initialized before any servlets - It will be destroyed after any servlets (so you won't close the pool while something is processing) - It's not subject to recycling by the container - You don't need to rely on servlet startup order
Yoav Shapira
A minor additional point for those interested in porability of webapps. What Yoav cites is guaranteed in the Servlet 2.4 specifications, which applies to Tomcat 5. It is also true for Tomcat 4, but due to ambiquities in the Servlet 2.3 specifications, it isn't behavior guaranteed by the spec. A servlet container that calls ServletContextListeners after servlet initialization isn't in technical voilation of the Servlet 2.3 spec.
Cheers, Larry
This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Doug,
I'll appreciate your links and will take a look at them. Right now something weird is going on that would affect whatever solution I choose.
thanks,
Phil
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]