Rename default connection pool properties file to server.default.properties and client.default.properties. This change would allow developer to create fragment to contribute a customize server.properties or client.properties
This commit is contained in:
parent
8675e83423
commit
0ed2e11bd0
|
@ -553,9 +553,16 @@ public class DB_Oracle implements AdempiereDatabase
|
||||||
if (m_ds != null)
|
if (m_ds != null)
|
||||||
return m_ds;
|
return m_ds;
|
||||||
|
|
||||||
|
//try fragment contributed properties then default properties
|
||||||
URL url = Ini.isClient()
|
URL url = Ini.isClient()
|
||||||
? OracleBundleActivator.bundleContext.getBundle().getEntry("META-INF/pool/client.properties")
|
? OracleBundleActivator.bundleContext.getBundle().getEntry("META-INF/pool/client.properties")
|
||||||
: OracleBundleActivator.bundleContext.getBundle().getEntry("META-INF/pool/server.properties");
|
: OracleBundleActivator.bundleContext.getBundle().getEntry("META-INF/pool/server.properties");
|
||||||
|
if (url == null)
|
||||||
|
{
|
||||||
|
url = Ini.isClient()
|
||||||
|
? OracleBundleActivator.bundleContext.getBundle().getEntry("META-INF/pool/client.default.properties")
|
||||||
|
: OracleBundleActivator.bundleContext.getBundle().getEntry("META-INF/pool/server.default.properties");
|
||||||
|
}
|
||||||
Properties poolProperties = new Properties();
|
Properties poolProperties = new Properties();
|
||||||
try {
|
try {
|
||||||
poolProperties.load(url.openStream());
|
poolProperties.load(url.openStream());
|
||||||
|
|
|
@ -616,9 +616,16 @@ public class DB_PostgreSQL implements AdempiereDatabase
|
||||||
if (m_ds != null)
|
if (m_ds != null)
|
||||||
return m_ds;
|
return m_ds;
|
||||||
|
|
||||||
|
//try fragment contributed properties then default properties
|
||||||
URL url = Ini.isClient()
|
URL url = Ini.isClient()
|
||||||
? PostgreSQLBundleActivator.bundleContext.getBundle().getEntry("META-INF/pool/client.properties")
|
? PostgreSQLBundleActivator.bundleContext.getBundle().getEntry("META-INF/pool/client.properties")
|
||||||
: PostgreSQLBundleActivator.bundleContext.getBundle().getEntry("META-INF/pool/server.properties");
|
: PostgreSQLBundleActivator.bundleContext.getBundle().getEntry("META-INF/pool/server.properties");
|
||||||
|
if (url == null)
|
||||||
|
{
|
||||||
|
url = Ini.isClient()
|
||||||
|
? PostgreSQLBundleActivator.bundleContext.getBundle().getEntry("META-INF/pool/client.default.properties")
|
||||||
|
: PostgreSQLBundleActivator.bundleContext.getBundle().getEntry("META-INF/pool/server.default.properties");
|
||||||
|
}
|
||||||
Properties poolProperties = new Properties();
|
Properties poolProperties = new Properties();
|
||||||
try {
|
try {
|
||||||
poolProperties.load(url.openStream());
|
poolProperties.load(url.openStream());
|
||||||
|
|
Loading…
Reference in New Issue