aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cschnei...@apache.org
Subject [38/50] aries-jpa git commit: [ARIES-1689] Added check that entity manager is not null
Date Tue, 18 Apr 2017 12:55:30 GMT
[ARIES-1689] Added check that entity manager is not null

git-svn-id: https://svn.apache.org/repos/asf/aries/trunk/jpa@1785769 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/aries-jpa/repo
Commit: http://git-wip-us.apache.org/repos/asf/aries-jpa/commit/90229e84
Tree: http://git-wip-us.apache.org/repos/asf/aries-jpa/tree/90229e84
Diff: http://git-wip-us.apache.org/repos/asf/aries-jpa/diff/90229e84

Branch: refs/heads/master
Commit: 90229e843f0c66c7965ea9a81a7e3d188df6c0ac
Parents: 8f23eb0
Author: ggerla <ggerla@13f79535-47bb-0310-9956-ffa450edef68>
Authored: Mon Mar 6 21:20:45 2017 +0000
Committer: ggerla <ggerla@13f79535-47bb-0310-9956-ffa450edef68>
Committed: Mon Mar 6 21:20:45 2017 +0000

----------------------------------------------------------------------
 .../java/org/apache/aries/jpa/blueprint/impl/JpaInterceptor.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/aries-jpa/blob/90229e84/jpa-blueprint/src/main/java/org/apache/aries/jpa/blueprint/impl/JpaInterceptor.java
----------------------------------------------------------------------
diff --git a/jpa-blueprint/src/main/java/org/apache/aries/jpa/blueprint/impl/JpaInterceptor.java
b/jpa-blueprint/src/main/java/org/apache/aries/jpa/blueprint/impl/JpaInterceptor.java
index 59a5c8e..a6d5bf2 100644
--- a/jpa-blueprint/src/main/java/org/apache/aries/jpa/blueprint/impl/JpaInterceptor.java
+++ b/jpa-blueprint/src/main/java/org/apache/aries/jpa/blueprint/impl/JpaInterceptor.java
@@ -53,7 +53,7 @@ public class JpaInterceptor implements Interceptor {
 
     @Override
     public Object preCall(ComponentMetadata cm, Method m, Object... parameters) throws Throwable
{
-        if (coordinator == null) {
+        if (coordinator == null || em == null) {
             initServices();
         }
         try {
@@ -71,7 +71,7 @@ public class JpaInterceptor implements Interceptor {
     }
 
     private synchronized void initServices() {
-        if (coordinator == null) {
+        if (coordinator == null || em == null) {
             coordinator = (Coordinator)container.getComponentInstance(coordinatorId);
             em = (EntityManager)container.getComponentInstance(emId);
         }


Mime
View raw message