By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,649 Members | 2,142 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,649 IT Pros & Developers. It's quick & easy.

Server side default JDBC driver

P: n/a
Happy Christmas to all (who celebrate)!

It's still not clear to me... when in a java stored procedure it says:
conn = DriverManager.getConnection("jdbc:default:connecti on");
what driver DB2 database manager loads? Is it configurable on the
database server side so I could switch between different JDBC driver
types, i.e. 2 and 4?
I am on DB2 8.1.4 AIX and Linux.

Thanks,
-Eugene

Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a


eu****@profitlogic.com wrote:
Happy Christmas to all (who celebrate)!

It's still not clear to me... when in a java stored procedure it says:
conn = DriverManager.getConnection("jdbc:default:connecti on");
what driver DB2 database manager loads? Is it configurable on the
database server side so I could switch between different JDBC driver
types, i.e. 2 and 4?
I am on DB2 8.1.4 AIX and Linux.
Hi. That actually depends on DriverManager, and what order drivers were registered.
The DriverManager simply, blindly passes your URL and properties to every driver
that has been registered with it, until it finds one that doesn't throw an exception
and does return a connection. That's what you get back. So if multiple drivers
accept the same URL, whichever is loaded/tried first by DriverManager will always
be the one that returns your connection. You can determine which it is by calling
DriverManager.getDrivers(), which will give an enumeration of all loaded drivers.
You can step through that list, and call Driver.acceptsURL() to find which one
does accept your URL. Then just print out the driver's class name to get your answer.
Joe Weinstein at BEA

Thanks,
-Eugene


Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.