From: | Kris Jurka <books(at)ejurka(dot)com> |
---|---|
To: | George Lessmann <glessmann(at)hotmail(dot)com> |
Cc: | <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: odd jdbc driver synchronization issue |
Date: | 2004-01-05 22:42:28 |
Message-ID: | Pine.LNX.4.33.0401051735360.6474-200000@leary.csoft.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 | Content-Type | Size |
---|---|---|
CallTest.java | text/plain | 2.9 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Oliver Jowett | 2004-01-05 22:48:07 | Re: odd jdbc driver synchronization issue |
Previous Message | Andrew Dunstan | 2004-01-05 21:20:38 | Re: PL/Java issues |