Hello Hans! HW> my pool is specified exactly the same as the mysql pool on: HW> http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html
HW> why is the datasource.getNumActive() value always 0 even though I have HW> multiple connections open ? 1) Short-term solution. Use BasicDataSource from the dbcp directly: create a ServletContextListener, create a new pool on context startup and bind it to the ServetContext. Use that. 2) Long-term solution. Looks like the Tomcat JNDI resource handling is totally broken for pools. The thing is that Tomcat allows you to only bind a factory to JNDI and never an instance. Then it is up to the factory implementation what it returns. I have always had a back feeling that it was impossible to create pools this way. Or at least that the DBCP implementation would behave along the lines you have described. I'm probably going to push the subject both on tomcat-dev and on [EMAIL PROTECTED] (the home list for DBCP) _if_ I have time. I believe it's probably going to be a big BANG when people find out how this all is working (or rather not working now) On the other hand I'm quite busy, so dunno, how soon I'll be able to investigate all this stuff and push the discussions and decisions. If you like you may try on your own. My gut feeling is that unless Tomcat allows resource developers push INSTANCES to JNDI (not FACTORIES) we will never be able to fetch pool from JNDI (pools of any kind, or any other singletons) This has been blinking on my taskbar for a month already but I never had time for it. -Anton http://cvs.apache.org/~atagunov --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
