You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2017/08/03 16:01:18 UTC

[02/50] [abbrv] airavata git commit: [AIRAVATA-2421] Clear the EntityManager cache

[AIRAVATA-2421] Clear the EntityManager cache


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

Branch: refs/heads/master
Commit: d3bc3b6e2613c2395a949817e6a4d5df51ce8da1
Parents: f1f3712
Author: Gourav Shenoy <go...@apache.org>
Authored: Thu Jul 6 14:01:01 2017 -0400
Committer: Gourav Shenoy <go...@apache.org>
Committed: Thu Jul 6 14:01:01 2017 -0400

----------------------------------------------------------------------
 .../registry/core/app/catalog/util/AppCatalogJPAUtils.java       | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/d3bc3b6e/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogJPAUtils.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogJPAUtils.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogJPAUtils.java
index 01f9bbc..099c088 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogJPAUtils.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogJPAUtils.java
@@ -73,6 +73,10 @@ public class AppCatalogJPAUtils {
             factory.getCache().evictAll();
         }
         appCatEntityManager = factory.createEntityManager();
+        // clear the entitymanager cache
+        if (appCatEntityManager != null) {
+            appCatEntityManager.clear();
+        }
         return appCatEntityManager;
     }