Re: odd jdbc driver synchronization issue - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: odd jdbc driver synchronization issue
Date
Msg-id Pine.LNX.4.33.0401051735360.6474-200000@leary.csoft.net
Whole thread Raw
In response to Re: odd jdbc driver synchronization issue  ("George Lessmann" <glessmann@hotmail.com>)
Responses Re: odd jdbc driver synchronization issue
List pgsql-jdbc

On Mon, 5 Jan 2004, George Lessmann wrote:

>
> The original design of my test application allocated one Connection and
> two CallableStatements per client (one for the parent insert and one for
> the child insert). As I reported earlier, each client would then be
> serialized, even though they each existed in their own
> thread/connection/callablestatement.
>
> I then refactored the application to allocate a connection per client,
> and prepareCall() before every execute(). This change resulted in each
> client being able to concurrently access the database, even though, in
> my opinion, it violates the whole reason behind a prepareCall() which is
> to reuse it often without recompilation.

I've attached a program I wrote to try and verify your claims.  I see no
serialization despite a single prepareCall and many executes.  This
program runs with

java CallTest <num clients> <num runs per client>

each client does a loop over numRuns, calling a SELECT stored
procedure and then inserts that value into a table via another stored
procedure.

Let me know if you see a problem with this test or how your application
differs.

Kris Jurka

Attachment

pgsql-jdbc by date:

Previous
From: "George Lessmann"
Date:
Subject: Re: odd jdbc driver synchronization issue
Next
From: Oliver Jowett
Date:
Subject: Re: odd jdbc driver synchronization issue