aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gge...@apache.org
Subject svn commit: r1785769 - /aries/trunk/jpa/jpa-blueprint/src/main/java/org/apache/aries/jpa/blueprint/impl/JpaInterceptor.java
Date Mon, 06 Mar 2017 21:20:45 GMT
Author: ggerla
Date: Mon Mar  6 21:20:45 2017
New Revision: 1785769

URL: http://svn.apache.org/viewvc?rev=1785769&view=rev
Log:
[ARIES-1689] Added check that entity manager is not null

Modified:
    aries/trunk/jpa/jpa-blueprint/src/main/java/org/apache/aries/jpa/blueprint/impl/JpaInterceptor.java

Modified: aries/trunk/jpa/jpa-blueprint/src/main/java/org/apache/aries/jpa/blueprint/impl/JpaInterceptor.java
URL: http://svn.apache.org/viewvc/aries/trunk/jpa/jpa-blueprint/src/main/java/org/apache/aries/jpa/blueprint/impl/JpaInterceptor.java?rev=1785769&r1=1785768&r2=1785769&view=diff
==============================================================================
--- aries/trunk/jpa/jpa-blueprint/src/main/java/org/apache/aries/jpa/blueprint/impl/JpaInterceptor.java
(original)
+++ aries/trunk/jpa/jpa-blueprint/src/main/java/org/apache/aries/jpa/blueprint/impl/JpaInterceptor.java
Mon Mar  6 21:20:45 2017
@@ -53,7 +53,7 @@ public class JpaInterceptor implements I
 
     @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 I
     }
 
     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