Re: [SPAM] - Re: [SPAM] - Re: JDBC HighLoad - Found word(s)

From: Kris Jurka <books(at)ejurka(dot)com>
To: Stéphane RIFF <stephane(dot)riff(at)cerene(dot)fr>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: [SPAM] - Re: [SPAM] - Re: JDBC HighLoad - Found word(s)
Date: 2005-01-31 20:03:22
Message-ID: Pine.BSO.4.56.0501311501240.6638@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Mon, 31 Jan 2005, [ISO-8859-1] Stéphane RIFF wrote:

> Ok so how can i make a preparedStatement pool or
> allocated my preparedStatements for each connection ???
>

Statements are allocated per connection, the problem is that you only have
one variable that tracks only the latest allocated statement. I would
suggest splitting your class into two. One, the singleton which creates
the pool, and two a class which holds the statements. Then you create a
new ClassTwo object for each thread/connection.

Kris Jurka

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kolli, Kishore 2005-02-01 07:00:07 Postgresql 8.0, Tomcat 5.5 postgresql-8.0.309.jdbc3.jar and hiber nate 2.1 on Windows XP - could not receive data from client: No connectio n could be made because the target machine actively refused it
Previous Message Oliver Jowett 2005-01-31 19:34:38 Re: Help with exception: java.lang.IllegalArgumentException: