Re: [SPAM] - Re: [SPAM] - Re: JDBC HighLoad - Found word(s) - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: [SPAM] - Re: [SPAM] - Re: JDBC HighLoad - Found word(s)
Date
Msg-id Pine.BSO.4.56.0501311501240.6638@leary.csoft.net
Whole thread Raw
In response to Re: [SPAM] - Re: [SPAM] - Re: JDBC HighLoad - Found word(s)  (Stéphane RIFF <stephane.riff@cerene.fr>)
Responses Re: [SPAM] - Re: [SPAM] - Re: JDBC HighLoad - Found word(s)  (Stéphane RIFF <stephane.riff@cerene.fr>)
List 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


pgsql-jdbc by date:

Previous
From: Oliver Jowett
Date:
Subject: Re: Help with exception: java.lang.IllegalArgumentException:
Next
From: "Kolli, Kishore"
Date:
Subject: 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