Re: Specifying driver name when combining Replication driver and DBCP
Mark Matthews <[email protected]> Wed, 14 Apr 2010 12:13:53 -0700
| Newsgroups | gmane.comp.db.mysql.java |
|---|---|
| Message-ID | <[email protected]> |
On Apr 14, 2010, at 11:03 AM, Kevin Fries wrote: > Hi, > I've not seen this clearly documented, so I'd like to get it = clarified. We're using master/slave configuration, and we want our = connection pool to connect both to master and slave in the fashion of = the ReplicationDriver. >=20 > We're running against mysql 5.1.x, and using jdbc driver jar 5.1.12, = latest released at the moment. >=20 > Should we be specifying = com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource for the = driver name, when we also want the benefits of the Replication driver? = Will we get the full benefit of the ReplicationDriver ? =20 >=20 > This is in an environment without a container, btw. We're using the = url to look up the driver to use. We use Class.forName to load whatever = drivername we want. And we use dbcp-1.2.2, but sometime soon we hope to = upgrade to the new dbcp. >=20 > It appears to work fine then we specify the = MysqlConnectionPoolDataSource, and the replication url I thought I = should should get a better opinion. >=20 > Thanks very much, > Kevin Fries Kevin, As long as whatever is driving MysqlConnectionPoolDatasource doesn't = assume it's smarter than it and mess with the URL passed to setURL(), = the driver will automagically use the right driver based on it's = sub-protocoal (...:replication ...:loadbalance, et-al). As far as I know, DBCP does not do this. -Mark --=20 Mark Matthews Principal Software Developer - Enterprise Tools Oracle http://www.mysql.com/products/enterprise/monitor.html -- MySQL Java Mailing List For list archives: http://lists.mysql.com/java To unsubscribe: http://lists.mysql.com/[email protected]