Author: rohini
Date: Thu Oct 10 21:36:01 2013
New Revision: 1531119
URL: http://svn.apache.org/r1531119
Log:
OOZIE-1570 Make openjpa connection properties configurable (rohini)
Modified:
oozie/trunk/core/src/main/java/org/apache/oozie/service/JPAService.java
oozie/trunk/release-log.txt
Modified:
oozie/trunk/core/src/main/java/org/apache/oozie/service/JPAService.java
URL:
http://svn.apache.org/viewvc/oozie/trunk/core/src/main/java/org/apache/oozie/service/JPAService.java?rev=1531119&r1=1531118&r2=1531119&view=diff
==============================================================================
--- oozie/trunk/core/src/main/java/org/apache/oozie/service/JPAService.java
(original)
+++ oozie/trunk/core/src/main/java/org/apache/oozie/service/JPAService.java Thu
Oct 10 21:36:01 2013
@@ -68,6 +68,7 @@ public class JPAService implements Servi
public static final String CONF_USERNAME = CONF_PREFIX + "jdbc.username";
public static final String CONF_PASSWORD = CONF_PREFIX + "jdbc.password";
public static final String CONF_CONN_DATA_SOURCE = CONF_PREFIX +
"connection.data.source";
+ public static final String CONF_CONN_PROPERTIES = CONF_PREFIX +
"connection.properties";
public static final String CONF_MAX_ACTIVE_CONN = CONF_PREFIX +
"pool.max.active.conn";
public static final String CONF_CREATE_DB_SCHEMA = CONF_PREFIX +
"create.db.schema";
@@ -110,6 +111,7 @@ public class JPAService implements Servi
String password = conf.get(CONF_PASSWORD, "").trim();
String maxConn = conf.get(CONF_MAX_ACTIVE_CONN, "10").trim();
String dataSource = conf.get(CONF_CONN_DATA_SOURCE,
"org.apache.commons.dbcp.BasicDataSource");
+ String connPropsConfig = conf.get(CONF_CONN_PROPERTIES);
boolean autoSchemaCreation = conf.getBoolean(CONF_CREATE_DB_SCHEMA,
true);
boolean validateDbConn = conf.getBoolean(CONF_VALIDATE_DB_CONN, false);
String evictionInterval =
conf.get(CONF_VALIDATE_DB_CONN_EVICTION_INTERVAL, "300000").trim();
@@ -154,6 +156,9 @@ public class JPAService implements Servi
else {
connProps +=
",TestOnBorrow=false,TestOnReturn=false,TestWhileIdle=false";
}
+ if (connPropsConfig != null) {
+ connProps += "," + connPropsConfig;
+ }
props.setProperty("openjpa.ConnectionProperties", connProps);
props.setProperty("openjpa.ConnectionDriverName", dataSource);
Modified: oozie/trunk/release-log.txt
URL:
http://svn.apache.org/viewvc/oozie/trunk/release-log.txt?rev=1531119&r1=1531118&r2=1531119&view=diff
==============================================================================
--- oozie/trunk/release-log.txt (original)
+++ oozie/trunk/release-log.txt Thu Oct 10 21:36:01 2013
@@ -1,5 +1,6 @@
-- Oozie 4.1.0 release (trunk - unreleased)
+OOZIE-1570 Make openjpa connection properties configurable (rohini)
OOZIE-1560 Log messages should have a way of identifying which server they
came from when using HA (rkanter)
OOZIE-1566 Add reference to Quartz module in cron documentation (bowenzhangusa
via rkanter)
OOZIE-1454 Documentation for cron syntax scheduling of coordinator job
(bowenzhangusa via rkanter)