felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r778512 - /felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/DependencyManager.java
Date Mon, 25 May 2009 21:13:25 GMT
Author: fmeschbe
Date: Mon May 25 21:13:24 2009
New Revision: 778512

URL: http://svn.apache.org/viewvc?rev=778512&view=rev
Log:
FELIX-1178 Add m_pendingDeactivation flag to ensure a component is scheduled for activation
if deactivation is scheduled but the component is still active if a service reference change
occurrs

Modified:
    felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/DependencyManager.java

Modified: felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/DependencyManager.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/DependencyManager.java?rev=778512&r1=778511&r2=778512&view=diff
==============================================================================
--- felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/DependencyManager.java (original)
+++ felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/DependencyManager.java Mon May
25 21:13:24 2009
@@ -201,11 +201,13 @@
     private void serviceAdded( ServiceReference reference )
     {
         // if the component is currently unsatisfied, it may become satisfied
-        // by adding this service, try to activate
-        if ( m_componentManager.getState() == AbstractComponentManager.STATE_UNSATISFIED
)
+        // by adding this service, try to activate (also schedule activation
+        // if the component is pending deactivation)
+        if ( m_componentManager.getState() == AbstractComponentManager.STATE_UNSATISFIED
+            || m_componentManager.isPendingDeactivate() )
         {
             m_componentManager.log( LogService.LOG_INFO, "Dependency Manager: Service "
-                + m_dependencyMetadata.getName() + " registered, trying to activate", m_componentManager
+                + m_dependencyMetadata.getName() + " registered, activate component", m_componentManager
                 .getComponentMetadata(), null );
 
             m_componentManager.activate();



Mime
View raw message