The DriverManager provides a basic service for managing a set of
JDBC drivers.
As part of its initialization, the DriverManager class will
attempt to load the driver classes referenced in the "jdbc.drivers"
system property. This allows a user to customize the JDBC Drivers
used by their applications. For example in your
~/.hotjava/properties file you might specify:
jdbc.drivers=foo.bah.Driver:wombat.sql.Driver:bad.taste.ourDriver
A program can also explicitly load JDBC drivers at any time. For
example, the my.sql.Driver is loaded with the following statement:
Class.forName("my.sql.Driver");
When getConnection is called the DriverManager will attempt to
locate a suitable driver from amongst those loaded at
initialization and those loaded explicitly using the same classloader
as the current applet or application.
Attempt to establish a connection to the given database URL.
The DriverManager attempts to select an appropriate driver from
the set of registered JDBC drivers.
Parameters:
url - a database url of the form jdbc:subprotocol:subname
info - a list of arbitrary string tag/value pairs as
connection arguments; normally at least a "user" and
"password" property should be included
Attempt to establish a connection to the given database URL.
The DriverManager attempts to select an appropriate driver from
the set of registered JDBC drivers.
Parameters:
url - a database url of the form jdbc:subprotocol:subname
user - the database user on whose behalf the Connection is being made
Attempt to establish a connection to the given database URL.
The DriverManager attempts to select an appropriate driver from
the set of registered JDBC drivers.
Parameters:
url - a database url of the form jdbc:subprotocol:subname
Attempt to locate a driver that understands the given URL.
The DriverManager attempts to select an appropriate driver from
the set of registered JDBC drivers.
Parameters:
url - a database url of the form jdbc:subprotocol:subname