Re: Under what circumstances does PreparedStatement use stored plans? - Mailing list pgsql-jdbc

From James Robinson
Subject Re: Under what circumstances does PreparedStatement use stored plans?
Date
Msg-id 08983847-8DA1-11D8-8D1B-000A9566A412@socialserve.com
Whole thread Raw
In response to Re: Under what circumstances does PreparedStatement use stored  (Oliver Jowett <oliver@opencloud.com>)
List pgsql-jdbc
On Apr 13, 2004, at 5:18 PM, Oliver Jowett wrote:

> This sounds like JDBC3's "statement pooling" option. There's no API
> for this, it's just allowable behaviour, so we should be fine to
> implement something like this.
>
> Actually, you don't have to do this in the driver itself at all -- you
> can do it in your connection pooling layer if you proxy the
> PreparedStatement objects handed out to clients. close() on a proxy
> returns the underlying statement to a per-physical-connection pool of
> statements rather than actually closing it. Then the driver can just
> store prepared-query-plan info per PreparedStatement as it currently
> does.

I fear diving into the JBoss connection pool code. The JDBC driver is a
shining example of clear, simple code relative to the JBoss codebase.
Plus I would imagine this issue would exist across any EJB container /
connection pool mechanism.

I'll need to read the JDBC3 spec, I guess.

----
James Robinson
Socialserve.com


pgsql-jdbc by date:

Previous
From: Oliver Jowett
Date:
Subject: Re: Under what circumstances does PreparedStatement use stored
Next
From: Oliver Jowett
Date:
Subject: patch: fix TimeTest in timezones ahead of GMT