Name
DriverManager
Synopsis
Class Name:
java.sql.DriverManager
Superclass: None
Immediate Subclasses: None
Interfaces Implemented: None
Availability: JDK 1.1
Description
The DriverManager
holds the master list of
registered JDBC drivers for the system. Upon initialization, it loads
all classes specified in the jdbc.drivers
property. You can thus specify any runtime information about the
database being used by an application on the command line.
During program execution, other drivers may register themselves with
the DriverManager
by calling the
registerDriver( )
method. The
DriverManager
uses a JDBC URL to find an
application’s desired driver choice when requests are made
through getConnection( )
.
The DriverManager
class is likely to disappear one
day as the new JDBC 2.0 Standard Extension provides a more
application-friendly way of getting a database connection.
Class Summary
public class DriverManager {
static void deregisterDriver(Driver driver)
throws SQLException;
static public synchronized Connection getConnection(String url,
Properties info) throws SQLException;
static public synchronized Connection getConnection(String url,
String user, String password) throws SQLException;
static public synchronized Connection getConnection(String url)
throws SQLException;
static public Driver getDriver(String url) throws SQLException;
static public Enumeration getDrivers( );
static public int getLoginTimeout( );
#static public PrintStream getLogStream( );
static public PrintWriter getLogWriter( ...
Get Database Programming with JDBC & Java, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.