* [ 1657621 ] Too many connections opened

This commit is contained in:
Heng Sin Low 2007-02-12 10:24:04 +00:00
parent dd4c09f2cb
commit d592316168
1 changed files with 3 additions and 1 deletions

View File

@ -480,6 +480,7 @@ public class DB_PostgreSQL implements AdempiereDatabase
//org.postgresql.ds.PGPoolingDataSource ds = new org.postgresql.ds.PGPoolingDataSource(); //org.postgresql.ds.PGPoolingDataSource ds = new org.postgresql.ds.PGPoolingDataSource();
org.postgresql.jdbc3.Jdbc3PoolingDataSource ds = new org.postgresql.jdbc3.Jdbc3PoolingDataSource(); org.postgresql.jdbc3.Jdbc3PoolingDataSource ds = new org.postgresql.jdbc3.Jdbc3PoolingDataSource();
ds.setDataSourceName("CompiereDS"); ds.setDataSourceName("CompiereDS");
ds.setServerName(connection.getDbHost()); ds.setServerName(connection.getDbHost());
ds.setDatabaseName(connection.getDbName()); ds.setDatabaseName(connection.getDbName());
@ -487,7 +488,7 @@ public class DB_PostgreSQL implements AdempiereDatabase
ds.setPassword(connection.getDbPwd()); ds.setPassword(connection.getDbPwd());
ds.setPortNumber(connection.getDbPort()); ds.setPortNumber(connection.getDbPort());
ds.setMaxConnections(50); ds.setMaxConnections(50);
ds.setInitialConnections(20); ds.setInitialConnections(3);
//new InitialContext().rebind("DataSource", source); //new InitialContext().rebind("DataSource", source);
m_ds = ds; m_ds = ds;
@ -540,6 +541,7 @@ public class DB_PostgreSQL implements AdempiereDatabase
{ {
log.config(toString()); log.config(toString());
if (m_ds != null) if (m_ds != null)
{ {
try try