DataSource

In the early days of jdbc, developers learned the ridiculous way of using Class.forName(jdbcDriverClassName) to register a driver, followed by DriverManager.getConnection(jdbcUrl, props) to obtain a connection. This has been superseded by using a DataSource instance.

DataSource is a simple interface, but a rather ambiguous concept. According to its javadoc there three implementation types:

The DataSource has a few serious shortcomings: