db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Anders Hatlen <knut.hat...@oracle.com>
Subject Re: Closing connection result with exception
Date Fri, 11 Feb 2011 11:50:17 GMT
Egidijus Vaisnora <egidijus.vaisnora@nomagic.com> writes:

> I have updated derby but still the same. Issue DERBY-3806 covers
> problem when ResultSet was not closed, however I am closing ResultSet,
> prepared statement and then connections. What I am not doing is commit
> either rollback calls - jsut because I am executing SELECT statement.
> Do I need to call "commit" or "rollback" in any case before "close",
> even if I am using SELECT statement and I am closing opened ResultSet
> and prepared statement?

Yes, a select statement executes within a transaction and may acquire
locks that are not released until the transaction has finished, so
read-only transactions need to be committed or rolled back too.

Knut Anders

View raw message