Joined: Mon May 26, 2008 7:12 am Posts: 2 Location: Bangalore,India
|
When I am trying to read an entity from DB I am getting the following exception.
java.sql.SQLException: Result set already closed
at weblogic.jdbc.wrapper.ResultSet.checkResultSet(ResultSet.java:100)
at weblogic.jdbc.wrapper.ResultSet.preInvocationHandler(ResultSet.java:56)
at weblogic.jdbc.wrapper.ResultSet_oracle_jdbc_driver_OracleResultSetImpl.next(Unknown Source)
at org.hibernate.loader.Loader.doQuery(Loader.java:697)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
at org.hibernate.loader.Loader.loadEntity(Loader.java:1860)
I tried to figure out problem from hibernate source code.
I observed that closeStatements() in AbstractBatcher(org.hibernate.jdbc) is causing this problem.
Actually if the read operation is non-transactional it closes all the opened resultsets. I think this is not a correct behaviour.
It shouldn't close the sibling resultsets. It should close only the corresponding result set on which query has been executed.
|
|