JDBC drivers must implement the Driver interface, and the implementation must contain a static initializer that will be called when the driver is loaded. This initializer registers a new instance of itself with the DriverManager (no more in 4.1)
Example static initializer for a driver implementing java.sql.Driver
public class AcmeJdbcDriver implements java.sql.Driver {
static {
java.sql.DriverManager.registerDriver(new
AcmeJdbcDriver());
}
...
}
When a Driver implementation is loaded, the static initializer will automatically register an instance of the driver.
The client using this driver may assume that the JDBC driver classes are:
You can use JDBC drivers to connect to the following data sources: