IDEMPIERE-3830 c3p0 defaults are not exploiting the power of c3p0 reliability
This commit is contained in:
parent
5d31f298fd
commit
ac14fcd294
|
@ -305,7 +305,7 @@ public interface AdempiereDatabase
|
|||
/**
|
||||
* Default sql use to test whether a connection is still valid
|
||||
*/
|
||||
public final static String DEFAULT_CONN_TEST_SQL = "SELECT Version FROM AD_System";
|
||||
//public final static String DEFAULT_CONN_TEST_SQL = "SELECT Version FROM AD_System";
|
||||
|
||||
/**
|
||||
* Is the database have sql extension that return a subset of the query result
|
||||
|
|
|
@ -12,5 +12,5 @@ MinPoolSize=1
|
|||
|
||||
#flag
|
||||
TestConnectionOnCheckin=false
|
||||
TestConnectionOnCheckout=false
|
||||
TestConnectionOnCheckout=true
|
||||
#CheckoutTimeout=60;
|
||||
|
|
|
@ -13,6 +13,6 @@ MaxStatementsPerConnection=30
|
|||
|
||||
#flag
|
||||
TestConnectionOnCheckin=false
|
||||
TestConnectionOnCheckout=false
|
||||
TestConnectionOnCheckout=true
|
||||
#CheckoutTimeout=60;
|
||||
com.mchange.v2.log.MLog=com.mchange.v2.log.slf4j.Slf4jMLog
|
|
@ -664,7 +664,7 @@ public class DB_Oracle implements AdempiereDatabase
|
|||
int maxIdleTime = getIntProperty(poolProperties, "MaxIdleTime", 1200);
|
||||
int unreturnedConnectionTimeout = getIntProperty(poolProperties, "UnreturnedConnectionTimeout", 0);
|
||||
boolean testConnectionOnCheckin = getBooleanProperty(poolProperties, "TestConnectionOnCheckin", false);
|
||||
boolean testConnectionOnCheckout = getBooleanProperty(poolProperties, "TestConnectionOnCheckout", false);
|
||||
boolean testConnectionOnCheckout = getBooleanProperty(poolProperties, "TestConnectionOnCheckout", true);
|
||||
String mlogClass = getStringProperty(poolProperties, "com.mchange.v2.log.MLog", "com.mchange.v2.log.FallbackMLog");
|
||||
int checkoutTimeout = getIntProperty(poolProperties, "CheckoutTimeout", 0);
|
||||
int statementCacheNumDeferredCloseThreads = getIntProperty(poolProperties, "StatementCacheNumDeferredCloseThreads", 0);
|
||||
|
@ -679,7 +679,7 @@ public class DB_Oracle implements AdempiereDatabase
|
|||
cpds.setJdbcUrl(getConnectionURL(connection));
|
||||
cpds.setUser(connection.getDbUid());
|
||||
cpds.setPassword(connection.getDbPwd());
|
||||
cpds.setPreferredTestQuery(DEFAULT_CONN_TEST_SQL);
|
||||
//cpds.setPreferredTestQuery(DEFAULT_CONN_TEST_SQL);
|
||||
cpds.setIdleConnectionTestPeriod(idleConnectionTestPeriod);
|
||||
cpds.setAcquireRetryAttempts(acquireRetryAttempts);
|
||||
cpds.setTestConnectionOnCheckin(testConnectionOnCheckin);
|
||||
|
|
|
@ -12,5 +12,5 @@ MinPoolSize=1
|
|||
|
||||
#flag
|
||||
TestConnectionOnCheckin=false
|
||||
TestConnectionOnCheckout=false
|
||||
TestConnectionOnCheckout=true
|
||||
#CheckoutTimeout=60;
|
||||
|
|
|
@ -14,6 +14,6 @@ MaxStatementsPerConnection=30
|
|||
|
||||
#flag
|
||||
TestConnectionOnCheckin=false
|
||||
TestConnectionOnCheckout=false
|
||||
TestConnectionOnCheckout=true
|
||||
#CheckoutTimeout=60;
|
||||
com.mchange.v2.log.MLog=com.mchange.v2.log.slf4j.Slf4jMLog
|
|
@ -756,7 +756,7 @@ public class DB_PostgreSQL implements AdempiereDatabase
|
|||
int maxIdleTime = getIntProperty(poolProperties, "MaxIdleTime", 1200);
|
||||
int unreturnedConnectionTimeout = getIntProperty(poolProperties, "UnreturnedConnectionTimeout", 0);
|
||||
boolean testConnectionOnCheckin = getBooleanProperty(poolProperties, "TestConnectionOnCheckin", false);
|
||||
boolean testConnectionOnCheckout = getBooleanProperty(poolProperties, "TestConnectionOnCheckout", false);
|
||||
boolean testConnectionOnCheckout = getBooleanProperty(poolProperties, "TestConnectionOnCheckout", true);
|
||||
String mlogClass = getStringProperty(poolProperties, "com.mchange.v2.log.MLog", "com.mchange.v2.log.FallbackMLog");
|
||||
|
||||
int checkoutTimeout = getIntProperty(poolProperties, "CheckoutTimeout", 0);
|
||||
|
@ -772,7 +772,7 @@ public class DB_PostgreSQL implements AdempiereDatabase
|
|||
cpds.setJdbcUrl(getConnectionURL(connection));
|
||||
cpds.setUser(connection.getDbUid());
|
||||
cpds.setPassword(connection.getDbPwd());
|
||||
cpds.setPreferredTestQuery(DEFAULT_CONN_TEST_SQL);
|
||||
//cpds.setPreferredTestQuery(DEFAULT_CONN_TEST_SQL);
|
||||
cpds.setIdleConnectionTestPeriod(idleConnectionTestPeriod);
|
||||
cpds.setMaxIdleTimeExcessConnections(maxIdleTimeExcessConnections);
|
||||
cpds.setMaxIdleTime(maxIdleTime);
|
||||
|
|
Loading…
Reference in New Issue