I'm happy to report that Lance Andersen and the JDBC expert group have decided to support the new try-with-resources statement in JDBC 4.1. Lance just pushed a change set for JDBC 4.1 that retrofits the AutoCloseable interface to the types:

  • java.sql.Connection
  • java.sql.ResultSet

    java.sql.Statement

The change will be available in JDK 7 promoted builds in due course.



Read More about [Project Coin: JDBC 4.1 and try-with-resources...