db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeffrey Clary" <jcl...@actuate.com>
Subject RE: Heap container closed exception (2 statements on same connection)
Date Fri, 16 Mar 2007 13:39:22 GMT
I expected to be able to retrieve all 500 rows from the result set with
no exception.  I am not experienced with the holdability attribute, but
as I understand it, it allows a result set in a connection to stay open
across commits, either explicit or implicit.  

I have run the same test after calling
Connection.setHoldability(ResultSet.CLOSE_CURSORS_AT_COMMIT).  With
setting, the very first call to next() fails with an exception
indicating that the result set is not open.  That makes sense to me,
because the other statement (creating an unrelated table) triggered an
implicit commit.  However, with holdability set to
HOLD_CURSORS_OVER_COMMIT, I no longer get an exception on calling next()
the first time, but rather get good data for 415 calls.  On the 416th
call, I get an exception not that the result set is closed, but rather
than an underlying storage mechanism is closed.  

I'm mostly looking for some feedback that this is a bug, rather than
Derby working as designed, before I go over to the derby-dev mailing
list to talk about it.


-----Original Message-----
From: Bryan Pendleton [mailto:bpendleton@amberpoint.com] 
Sent: Thursday, March 15, 2007 5:32 PM
To: Derby Discussion
Subject: Re: Heap container closed exception (2 statements on same

> java.sql.SQLException: The heap container with container id 
> Container(-1, 1173965368428) is closed.

Hi Jeff,

I don't have a lot to offer on this problem, but I did try
your test program and I get the same exception, so the problem
reproduces for me.

What was the behavior that you expected to see, instead of the



View raw message