aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r1368208 - /aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/ReferenceRecipe.java
Date Wed, 01 Aug 2012 19:24:05 GMT
Author: gnodet
Date: Wed Aug  1 19:24:05 2012
New Revision: 1368208

URL: http://svn.apache.org/viewvc?rev=1368208&view=rev
Log:
[ARIES-897] The ReferenceRecipe sometimes unget the tracked service for no reason
Conflicts:

	blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/ReferenceRecipe.java

Modified:
    aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/ReferenceRecipe.java

Modified: aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/ReferenceRecipe.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/ReferenceRecipe.java?rev=1368208&r1=1368207&r2=1368208&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/ReferenceRecipe.java
(original)
+++ aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/ReferenceRecipe.java
Wed Aug  1 19:24:05 2012
@@ -160,14 +160,16 @@ public class ReferenceRecipe extends Abs
             trackedServiceReference = ref;
             voidProxiedChildren();
             bind(trackedServiceReference, proxy);
-            if (oldReference != null && trackedService != null) {
-              try {
-                getBundleContextForServiceLookup().ungetService(oldReference);
-              } catch (IllegalStateException ise) {
-                // In case the service no longer exists lets just cope and ignore.
+            if (ref != oldReference) {
+              if (oldReference != null && trackedService != null) {
+                try {
+                  blueprintContainer.getBundleContext().ungetService(oldReference);
+                } catch (IllegalStateException ise) {
+                  // In case the service no longer exists lets just cope and ignore.
+                }
               }
+              trackedService = null;
             }
-            trackedService = null;
             monitor.notifyAll();
         }
     }



Mime
View raw message