Skip site navigation (1) Skip section navigation (2)

Re: closing statements when connection is closed

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: pg(at)fastcrypt(dot)com
Cc: "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: closing statements when connection is closed
Date: 2004-02-10 04:33:07
Message-ID: 40285F03.1080003@opencloud.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
Dave Cramer wrote:
> It would appear from the documentation that we are supposed to clean up
> JDBC resources when Connecton.close is called, would this include
> statements. We currently don't track them or clean them up?
> 
> Opinions ?

We'd need JDK 1.2 to do this properly (weak reference support) otherwise 
we end up keeping Statements that have not been closed alive as long as 
the Connection object is.

As far as I can see the only additional thing we'd be able to clean up 
is clearing the reference to row data held by open ResultSet objects. 
This is only going to have an effect if something outside the driver is 
holding references to the ResultSet or Statement after closing the 
connection -- which seems like an application bug to me.

-O

In response to

Responses

pgsql-jdbc by date

Next:From: IainDate: 2004-02-10 04:53:53
Subject: Re: closing statements when connection is closed
Previous:From: David WallDate: 2004-02-10 04:20:21
Subject: Re: closing statements when connection is closed

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group