In my application I see a strange behavior. Whenever I rollback a
transaction, all ResultSets are closes. My Connection has auto commit
set to off.
The JDBC javadoc
(http://java.sun.com/javase/6/docs/api/java/sql/Connection.html#rollback())
only says that rollback releases all database locks, nothing about
releasing resources.
Any pointers?
Best regards,
Kovi
Depending on the DBMS, transaction isolation level, and the type of
result set, it may well hold DBMS locks. I suggest looking into
rowsets if you want to maintain the query results indefinitely.
Joe
Using regular SQL, whenever you do a commit, by default all cursors are
closed in DB2. You can override that by opening a cursor using the "WITH
HOLD" option. But I don't know how that is controlled in JDBC.
The strange thing is that if I do a commit, ResultSet stay opened.
Best regards,
Kovi
Mark A pravi: