Delete comment from: Javarevisited
You can add few more best practices on JDBC resource management e.g. Apart from closing statements by calling their close() method, you can also call various free() methods to release more expensive resources e.g. Blob, Clob and Array. Blob, Clob, and NClob Java objects remain valid for at least the duration of the transaction in which they are created. This could potentially result in an application running out of resources during a long running transaction. In fact, any Array, Blob, Clob whose scope is entirely controlled within a local block should have its free() method called in a finally block to release respective resources. By the way you can only do this if you are using JDBC 4.0 released in Java 1.6, in lower version, you still depends on mercy of JDBC drivers and Garbage collector.
Feb 6, 2014, 12:42:10 AM