felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r1390591 - in /felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager: AbstractComponentManager.java ImmediateComponentManager.java ServiceFactoryComponentManager.java
Date Wed, 26 Sep 2012 16:23:55 GMT
Author: djencks
Date: Wed Sep 26 16:23:54 2012
New Revision: 1390591

URL: http://svn.apache.org/viewvc?rev=1390591&view=rev
Log:
FELIX-3681 discard dependency map when we discard the implementation object

Modified:
    felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/AbstractComponentManager.java
    felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/ImmediateComponentManager.java
    felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/ServiceFactoryComponentManager.java

Modified: felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/AbstractComponentManager.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/AbstractComponentManager.java?rev=1390591&r1=1390590&r2=1390591&view=diff
==============================================================================
--- felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/AbstractComponentManager.java
(original)
+++ felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/AbstractComponentManager.java
Wed Sep 26 16:23:54 2012
@@ -856,6 +856,11 @@ public abstract class AbstractComponentM
         return m_dependencies_map.compareAndSet( old, newDeps );
     }
 
+    protected void unsetDependencyMap()
+    {
+        m_dependencies_map.set( null );
+    }
+
     private void returnServices( Map deps )
     {
          for (Iterator it = deps.values().iterator(); it.hasNext(); )
@@ -1385,7 +1390,7 @@ public abstract class AbstractComponentM
                 {
                     acm.deleteComponent( reason );
                     acm.deactivateDependencyManagers();
-                    acm.m_dependencies_map.set( null );
+                    acm.unsetDependencyMap();
                 }
                 finally
                 {

Modified: felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/ImmediateComponentManager.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/ImmediateComponentManager.java?rev=1390591&r1=1390590&r2=1390591&view=diff
==============================================================================
--- felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/ImmediateComponentManager.java
(original)
+++ felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/ImmediateComponentManager.java
Wed Sep 26 16:23:54 2012
@@ -692,6 +692,7 @@ public class ImmediateComponentManager e
                         if ( m_useCount == 0 )
                         {
                             state().ungetService( this );
+                            unsetDependencyMap();
                         }
                     }
                     finally

Modified: felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/ServiceFactoryComponentManager.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/ServiceFactoryComponentManager.java?rev=1390591&r1=1390590&r2=1390591&view=diff
==============================================================================
--- felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/ServiceFactoryComponentManager.java
(original)
+++ felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/ServiceFactoryComponentManager.java
Wed Sep 26 16:23:54 2012
@@ -186,6 +186,7 @@ public class ServiceFactoryComponentMana
             if ( serviceContexts.isEmpty() && getState() == STATE_ACTIVE )
             {
                 changeState( Registered.getInstance() );
+                unsetDependencyMap();
             }
         }
         finally



Mime
View raw message