Autoloading of JDBC drivers. In earlier versions of JDBC,
applications had to manually register drivers before requesting
Connections. With JDBC 4.0, applications no longer need to issue a
Class.forName() on the driver name; instead, the DriverManager will
find an appropriate JDBC driver when the application requests a Connection.
Wrappers. JDBC 4.0 introduces the concept of wrapped JDBC
objects. This is a formal mechanism by which application servers can
look for vendor-specific extensions inside standard JDBC objects like
Connections, Statements, and ResultSets. For
this is a vacuous exercise because
does not expose any of these extensions.
Statement events. With JDBC 4.0, Connection pools can listen for Statement closing and Statement error events. New methods were added to javax.sql.PooledConnection: addStatementEventListener and removeStatementEventListener.
Streaming APIs. JDBC 4.0 adds new overloads of the streaming methods in CallableStatement, PreparedStatement, and ResultSet. These are the setXXX and updateXXX methods which take java.io.InputStream and java.io.Reader arguments. The new overloads allow you to omit the length arguments or to specify long lengths.