From: Andreas Joseph Krogh <andreak@officenet.no>
To: pgsql-jdbc@postgresql.org
Subject: Re: Connection Pool
Date: Tue, 5 Jun 2007 17:22:50 +0200
Message-ID: <200706051722.50953.andreak@officenet.no> (raw)
In-Reply-To: <46656EB2.1060408@enterprisedb.com>
References: <aa36b6870706042327v4f711f6ep1e1bd8df0d67fd34@mail.gmail.com>
<46656EB2.1060408@enterprisedb.com>
On Tuesday 05 June 2007 16:09:54 Heikki Linnakangas wrote:
> Raghavendra MB wrote:
> > I am using PostgresSQL 8.2 server. I would like to use JDBC connecton
> > pool: My application is pure core java desktop. Is there any readily
> > available pool for postgres ?
>
> There's plenty of generic implementations. For example, Apache commons
> DBCP: http://jakarta.apache.org/commons/dbcp/
I recommend C3PO, it's much simpler to set up in a standard application:
DataSource pooled = null;
try {
DataSource unpooled =
DataSources.unpooledDataSource("jdbc:postgresql://localhost:5432/mydb",
"username",
"password");
pooled = DataSources.pooledDataSource( unpooled );
} catch (Exception e) {
e.printStackTrace();
}
--
Andreas Joseph Krogh <andreak@officenet.no>
Senior Software Developer / Manager
------------------------+---------------------------------------------+
OfficeNet AS | The most difficult thing in the world is to |
Karenslyst Allé 11 | know how to do a thing and to watch |
PO. Box 529 Skøyen | somebody else doing it wrong, without |
0214 Oslo | comment. |
NORWAY | |
Tlf: +47 24 15 38 90 | |
Fax: +47 24 15 38 91 | |
Mobile: +47 909 56 963 | |
------------------------+---------------------------------------------+
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: andreak@officenet.no
Subject: Re: Connection Pool
In-Reply-To: <200706051722.50953.andreak@officenet.no>
References: <aa36b6870706042327v4f711f6ep1e1bd8df0d67fd34@mail.gmail.com> <46656EB2.1060408@enterprisedb.com> <200706051722.50953.andreak@officenet.no>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox