The JDBC Optional Package

The Core JDBC package is part of the standard Java Development Kit. There is also an additional JDBC package that is part of J2EE that addresses some of the enterprise-level uses of JDBC. These extensions belong to the javax.sql package as opposed to java.sql.

Data Sources

One of the irritating parts of JDBC is the way to load drivers. It can be difficult to reconfigure an application to use a different database. Using the standard JDBC API, you must use a specific JDBC URL to access a database. The Optional JDBC package includes an alternative to the DriverManager class for creating database connections.

A DataSource object works like the DriverManager class, it has a getConnection method and also a getLogWriter method. ...

Get Special Edition Using Java™ 2 Enterprise 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.