users@glassfish.java.net

Correct driver to use with a connection pool?

From: <glassfish_at_javadesktop.org>
Date: Thu, 30 Sep 2010 13:49:10 PDT

There is so much misinformation out there, so I wanted to check here.

The MySQL guys (to take one example) say this: http://dev.mysql.com/doc/refman/5.0/en/connector-j-usagenotes-j2ee.html#connector-j-usagenotes-glassfish-config

Briefly: use their driver, and mark it as implementing the javax.sql.DataSource interface.

I've seen other places that recommend using their driver and marking it as implementing the javax.sql.ConnectionPoolDataSource interface.

I've always been unclear on which interface to use (lots of database driver vendors will supply both) when setting up a Glassfish connection pool.

Somewhere I got it in my head that it was more proper to use a javax.sql.ConnectionPoolDataSource as the interface that a driver implements (if indeed it implements that interface).

Which data source interface is preferred?

Best,
Laird
[Message sent by forum member 'ljnelson']

http://forums.java.net/jive/thread.jspa?messageID=484060