anjana wrote:
If I get a JDBC exception, I want to make sure the database resources are released. Since I have read only queries. I am not using a transaction
and hence cannot call rollback or commit.
Instead I call session.close().
Is this going to gurantee that the JDBC statement is closed and associated database resources released ?
You realize the Hibernate distribution comes with ALL the code right ?
If you are using a debugger, it's easy to just step into the Hibernate code and see what's going on there. If not, you can just search the src tree.
And yes, if you're using a straight connection. It will be closed.