Julian writes:

> The part I'm slightly concerned about is that I don't use the
DriverManager
> to get an instance of the driver, but instead instantiate the driver using
> either the built in class loader or the AntClassLoader depending on
whether
> or not the user specifies a classpath.

This is actually the way that you are supposed to do it. The JDBC driver is
supposed to register itself with the DriverManager (using the
registerDriver()
method) when it is loaded.

Another way of loading JDBC drivers is to set the "jdbc.drivers" property
with a colon-separated list of drivers (java classes) and terminated with a
semi-colon. The DriverManager starts by loading all the drivers specified
in this property. Individual drivers can be loaded by calling
Class.forName()
with the driver class name.

-- information gleaned from Enterprise Java in a Nutshell (O'Reilly).

Cheers,

Colin



Reply via email to