However, I've never needed it, and I use pure JDBC a lot. I always close the statements and resultsets in the same method I've opened them, in the finally block. In case where some code paths do not open the statement, I simply assign null to the variable, which indicates it was not opened and therefore shouldn't be closed.
posted 5 years ago
Thanks Martin for your reply.
I also couldn't find any alternative for the same. As of now I am checking that CallableStatement with null instead of isClosed() for JDK 5 environment.