db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Satheesh Bandaram <sathe...@Sourcery.Org>
Subject Re: Cursors
Date Fri, 15 Jul 2005 01:09:39 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
If closing ResultSets and Statements don't release memory, I think,
that would be a bug. If you have a repro, I would file a bug in Jira
and attach a test case.<br>
<br>
Satheesh<br>
<br>
simmi iyer wrote:<br>
<blockquote
 cite="mid20050714045103.28866.qmail@web30707.mail.mud.yahoo.com"
 type="cite">
  <pre wrap="">What I mean is ResultSet.close() in java is not
closing the cursors at database end. Because of that
RAM utilized keeps on increasing and at some point of
time "Out of Memory" error occurs.

As per Derby docs, cursors get closed at connection
commit. Is there a way to close cursors before commit?

thx

--- Daniel John Debrunner <a class="moz-txt-link-rfc2396E" href="mailto:djd@debrunners.com">&lt;djd@debrunners.com&gt;</a>
wrote:

  </pre>
  <blockquote type="cite">
    <pre wrap="">simmi iyer wrote:

    </pre>
    <blockquote type="cite">
      <pre wrap="">Using network client driver to connect to network
server.

Using java threads to run parallel selects. RAM
      </pre>
    </blockquote>
    <pre wrap="">used
    </pre>
    <blockquote type="cite">
      <pre wrap="">goes up and after some time Network server throws
      </pre>
    </blockquote>
    <pre wrap="">"Out
    </pre>
    <blockquote type="cite">
      <pre wrap="">of Memory" error.

Obviously the cursors at database end are not
      </pre>
    </blockquote>
    <pre wrap="">getting
    </pre>
    <blockquote type="cite">
      <pre wrap="">closed when ResultSet is closed at the client end
      </pre>
    </blockquote>
    <pre wrap="">java
    </pre>
    <blockquote type="cite">
      <pre wrap="">code.

I understand from Derby docs that cursors by
      </pre>
    </blockquote>
    <pre wrap="">default
    </pre>
    <blockquote type="cite">
      <pre wrap="">get closed when  a commit is done on connection.
      </pre>
    </blockquote>
    <pre wrap="">Is
    </pre>
    <blockquote type="cite">
      <pre wrap="">there any other way of closing the database
      </pre>
    </blockquote>
    <pre wrap="">cursors?

Maybe I'm not understanding what exactly you mean,
but can you just call
the close method? java.sql.ResultSet.close().

Dan.


    </pre>
  </blockquote>
  <pre wrap=""><!---->

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
<a class="moz-txt-link-freetext" href="http://mail.yahoo.com">http://mail.yahoo.com</a>




  </pre>
</blockquote>
</body>
</html>


Mime
View raw message