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