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 | |
------------------------+---------------------------------------------+