You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2017/07/11 15:19:44 UTC

[Bug 55662] Add a way to set an instance of java.sql.Driver directly on org.apache.tomcat.jdbc.pool.DataSource

https://bz.apache.org/bugzilla/show_bug.cgi?id=55662

--- Comment #2 from Jonathan Leech <jo...@gmail.com> ---
The DataSource or the ConnectionPool should also own the Driver instance,
rather than the PooledConnection object. That a new instance of the Driver is
instantiated via reflection for every Connection the pool creates is benign in
most cases and catastrophic in others (e.g. Apache Phoenix will create a set of
zookeeper connections for each instance of PhoenixDriver, which blows up
spectacularly). Standard JDBC has the DriverManager create the single instance
of the driver. Tomcat-dbcp seems to get it mostly right, although I think
Java's DriverManager may create an instance of the Driver, and each pool may
create a redundant one.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org