correcting connection properties varibale in JPAUtils

Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/93a4a66f
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/93a4a66f
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/93a4a66f

Branch: refs/heads/develop
Commit: 93a4a66f448c29bbc1813be4e1567e2b70a4fd4b
Parents: a9187f2
Author: Anuj Bhandar <[email protected]>
Authored: Wed Dec 14 15:34:01 2016 -0500
Committer: Anuj Bhandar <[email protected]>
Committed: Wed Dec 14 15:34:01 2016 -0500

----------------------------------------------------------------------
 .../org/apache/airavata/registry/core/utils/JPAUtils.java    | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/93a4a66f/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/utils/JPAUtils.java
----------------------------------------------------------------------
diff --git 
a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/utils/JPAUtils.java
 
b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/utils/JPAUtils.java
index d1572f3..4f54863 100644
--- 
a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/utils/JPAUtils.java
+++ 
b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/utils/JPAUtils.java
@@ -39,10 +39,10 @@ public class JPAUtils {
 
         if (factory == null) {
             //FIXME
-            String connectionProperties = Utils.getJDBCDriver()+ "," +
-                    Utils.getJDBCURL()+"," +
-                    Utils.getJDBCUser()+"," +
-                    Utils.getJDBCPassword();
+            String connectionProperties = "DriverClassName=" + 
Utils.getJDBCDriver() + "," + "Url=" +
+                    Utils.getJDBCURL() + "?autoReconnect=true," +
+                    "Username=" + Utils.getJDBCUser() + "," + "Password=" + 
Utils.getJDBCPassword() +
+                    ",validationQuery=" + Utils.getValidationQuery();
             logger.info(connectionProperties);
             Map<String, String> properties = new HashMap<String, String>();
             properties.put("openjpa.ConnectionDriverName", 
"org.apache.commons.dbcp.BasicDataSource");

Reply via email to