airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject airavata git commit: enabling caching for app catalog
Date Tue, 09 Jun 2015 21:16:16 GMT
Repository: airavata
Updated Branches:
  refs/heads/airavata-0.15-release-branch 59e36d899 -> bba8f752e


enabling caching for app catalog


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

Branch: refs/heads/airavata-0.15-release-branch
Commit: bba8f752e998c610c83333b726300b4eb04ace72
Parents: 59e36d8
Author: Chathuri Wimalasena <chathuri@apache.org>
Authored: Tue Jun 9 17:16:11 2015 -0400
Committer: Chathuri Wimalasena <chathuri@apache.org>
Committed: Tue Jun 9 17:16:11 2015 -0400

----------------------------------------------------------------------
 .../application/catalog/data/util/AppCatalogJPAUtils.java       | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/bba8f752/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 4ee983f..b58c892 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
@@ -43,6 +43,7 @@ public class AppCatalogJPAUtils {
     private static final String APPCATALOG_JDBC_PWD = "appcatalog.jdbc.password";
     private static final String APPCATALOG_VALIDATION_QUERY = "appcatalog.validationQuery";
     private static final String JPA_CACHE_SIZE = "jpa.cache.size";
+    private static final String CACHE_ENABLED = "cache.enable";
     protected static EntityManagerFactory factory;
 
     public static EntityManager getEntityManager() throws ApplicationSettingsException {
@@ -58,8 +59,8 @@ public class AppCatalogJPAUtils {
             properties.put("openjpa.ConnectionProperties", connectionProperties);
             properties.put("openjpa.DynamicEnhancementAgent", "true");
             properties.put("openjpa.RuntimeUnenhancedClasses", "unsupported");
-            properties.put("openjpa.DataCache","true(CacheSize=" + Integer.valueOf(readServerProperties(JPA_CACHE_SIZE))
 + ", SoftReferenceSize=0)");
-            properties.put("openjpa.QueryCache","true(CacheSize=" + Integer.valueOf(readServerProperties(JPA_CACHE_SIZE))
 + ", SoftReferenceSize=0)");
+            properties.put("openjpa.DataCache","" + readServerProperties(CACHE_ENABLED) +
"(CacheSize=" + Integer.valueOf(readServerProperties(JPA_CACHE_SIZE)) + ", SoftReferenceSize=0)");
+            properties.put("openjpa.QueryCache","" + readServerProperties(CACHE_ENABLED)
+ "(CacheSize=" + Integer.valueOf(readServerProperties(JPA_CACHE_SIZE)) + ", SoftReferenceSize=0)");
             properties.put("openjpa.RemoteCommitProvider","sjvm");
             properties.put("openjpa.Log","DefaultLevel=INFO, Runtime=INFO, Tool=INFO, SQL=INFO");
             properties.put("openjpa.jdbc.SynchronizeMappings", "buildSchema(ForeignKeys=true)");


Mime
View raw message