From d592316168da0b37106de18580e71576a4a873bc Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Mon, 12 Feb 2007 10:24:04 +0000 Subject: [PATCH] * [ 1657621 ] Too many connections opened --- dbPort/src/org/compiere/db/DB_PostgreSQL.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dbPort/src/org/compiere/db/DB_PostgreSQL.java b/dbPort/src/org/compiere/db/DB_PostgreSQL.java index 464b6df262..fc881dad4a 100755 --- a/dbPort/src/org/compiere/db/DB_PostgreSQL.java +++ b/dbPort/src/org/compiere/db/DB_PostgreSQL.java @@ -480,6 +480,7 @@ public class DB_PostgreSQL implements AdempiereDatabase //org.postgresql.ds.PGPoolingDataSource ds = new org.postgresql.ds.PGPoolingDataSource(); org.postgresql.jdbc3.Jdbc3PoolingDataSource ds = new org.postgresql.jdbc3.Jdbc3PoolingDataSource(); + ds.setDataSourceName("CompiereDS"); ds.setServerName(connection.getDbHost()); ds.setDatabaseName(connection.getDbName()); @@ -487,7 +488,7 @@ public class DB_PostgreSQL implements AdempiereDatabase ds.setPassword(connection.getDbPwd()); ds.setPortNumber(connection.getDbPort()); ds.setMaxConnections(50); - ds.setInitialConnections(20); + ds.setInitialConnections(3); //new InitialContext().rebind("DataSource", source); m_ds = ds; @@ -540,6 +541,7 @@ public class DB_PostgreSQL implements AdempiereDatabase { log.config(toString()); + if (m_ds != null) { try