>  If that is the case the tomcat jdbc
> pooling library handling the call incorrectly and its a bug.
>

I'd be suspect of this. Are you actually using *org.apache.tomcat.jdbc.pool*?
Since it's a Tomcat module it seems an odd choice to use outside of Tomcat.

http://docs.oracle.com/javase/7/docs/api/javax/sql/PooledConnection.html



*The connection pool manager, typically the application server, maintains a
pool of PooledConnection objects. If there is a PooledConnection object
available in the pool, the connection pool manager returns a Connection
object that is a handle to that physical connection. If no PooledConnection
object is available, the connection pool manager calls the
ConnectionPoolDataSource method getPoolConnection to create a new physical
connection. The JDBC driver implementing ConnectionPoolDataSource creates a
new PooledConnection object and returns a handle to it. *
My emphasis there. Just using the tomcat jdbc classes doesn't guarantee you
have a pool. It does guarantee you'll get a connection, however it won't be
pooled if there isn't one. Am I misunderstanding that "outside of Tomcat"
means you're running Tomcat, but have some non-webapp application that's
trying to use the JNDI datasource? Or are you not running Tomcat at all?

Best,
John

Reply via email to