airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject git commit: possible fix to AIRAVATA-1418, need to test
Date Tue, 26 Aug 2014 18:05:18 GMT
Repository: airavata
Updated Branches:
  refs/heads/master fb9856001 -> e8e6949c8


possible fix to AIRAVATA-1418, need to test


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

Branch: refs/heads/master
Commit: e8e6949c8b1873d956052f32dcbd9b7d22d55e41
Parents: fb98560
Author: Chathuri Wimalasena <kamalasini@gmail.com>
Authored: Tue Aug 26 14:05:09 2014 -0400
Committer: Chathuri Wimalasena <kamalasini@gmail.com>
Committed: Tue Aug 26 14:05:09 2014 -0400

----------------------------------------------------------------------
 .../application/catalog/data/util/AppCatalogJPAUtils.java        | 4 ++--
 .../apache/airavata/persistance/registry/jpa/ResourceUtils.java  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/e8e6949c/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java
b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java
index 34155dc..b8774da 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java
@@ -49,7 +49,7 @@ public class AppCatalogJPAUtils {
     public static EntityManager getEntityManager() throws ApplicationSettingsException {
         if (factory == null) {
             String connectionProperties = "DriverClassName=" + readServerProperties(APPCATALOG_JDBC_DRIVER)
+ "," +
-                    "Url=" + readServerProperties(APPCATALOG_JDBC_URL) + "," +
+                    "Url=" + readServerProperties(APPCATALOG_JDBC_URL) + "?autoReconnect=true,"
+
                     "Username=" + readServerProperties(APPCATALOG_JDBC_USER) + "," +
                     "Password=" + readServerProperties(APPCATALOG_JDBC_PWD);
             System.out.println(connectionProperties);
@@ -64,7 +64,7 @@ public class AppCatalogJPAUtils {
             properties.put("openjpa.Log","DefaultLevel=INFO, Runtime=INFO, Tool=INFO, SQL=INFO");
             properties.put("openjpa.jdbc.SynchronizeMappings", "buildSchema(ForeignKeys=true)");
             properties.put("openjpa.jdbc.QuerySQLCache", "false");
-            properties.put("openjpa.ConnectionFactoryProperties", "PrettyPrint=true, PrettyPrintLineLength=72,
PrintParameters=true, MaxActive=10, MaxIdle=5, MinIdle=2, MaxWait=60000,  autoReconnect=true");
+            properties.put("openjpa.ConnectionFactoryProperties", "PrettyPrint=true, PrettyPrintLineLength=72,
PrintParameters=true, MaxActive=10, MaxIdle=5, MinIdle=2, MaxWait=31536000,  autoReconnect=true");
             factory = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME, properties);
         }
         return factory.createEntityManager();

http://git-wip-us.apache.org/repos/asf/airavata/blob/e8e6949c/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ResourceUtils.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ResourceUtils.java
b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ResourceUtils.java
index 18f0467..20fd855 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ResourceUtils.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/ResourceUtils.java
@@ -47,7 +47,7 @@ public class ResourceUtils {
     
     public static EntityManager getEntityManager(){
         if (factory == null) {
-            String connectionProperties = "DriverClassName=" + Utils.getJDBCDriver() + ","
+ "Url=" + Utils.getJDBCURL() + "," +
+            String connectionProperties = "DriverClassName=" + Utils.getJDBCDriver() + ","
+ "Url=" + Utils.getJDBCURL() + "?autoReconnect=true,," +
                     "Username=" + Utils.getJDBCUser() + "," + "Password=" + Utils.getJDBCPassword()
+ ",validationQuery=" +
             Utils.getValidationQuery();
             System.out.println(connectionProperties);
@@ -66,7 +66,7 @@ public class ResourceUtils {
 //            properties.put("openjpa.LockTimeout", "30000");
 //            properties.put("openjpa.LockManager", "none");
             properties.put("openjpa.jdbc.SynchronizeMappings", "buildSchema(ForeignKeys=true)");
-            properties.put("openjpa.ConnectionFactoryProperties", "PrettyPrint=true, PrettyPrintLineLength=72,
PrintParameters=true, MaxActive=10, MaxIdle=5, MinIdle=2, MaxWait=60000,  autoReconnect=true");
+            properties.put("openjpa.ConnectionFactoryProperties", "PrettyPrint=true, PrettyPrintLineLength=72,
PrintParameters=true, MaxActive=10, MaxIdle=5, MinIdle=2, MaxWait=31536000,  autoReconnect=true");
 			properties.put("openjpa.jdbc.QuerySQLCache", "false");
             factory = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME, properties);
         }


Mime
View raw message