You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by pd...@apache.org on 2014/03/09 23:49:07 UTC

svn commit: r1575780 - /felix/sandbox/pderop/dependencymanager-prototype/dm/src/dm/impl/DependencyImpl.java

Author: pderop
Date: Sun Mar  9 22:49:07 2014
New Revision: 1575780

URL: http://svn.apache.org/r1575780
Log:
Update (autoconfigure) added/changed/removed dependencies if the current state is INSTANTIATED_AND_WAITING_FOR_REQUIRED
and if the dependencies are *not* "instance-bound" dependencies.

Modified:
    felix/sandbox/pderop/dependencymanager-prototype/dm/src/dm/impl/DependencyImpl.java

Modified: felix/sandbox/pderop/dependencymanager-prototype/dm/src/dm/impl/DependencyImpl.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/dm/src/dm/impl/DependencyImpl.java?rev=1575780&r1=1575779&r2=1575780&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/dm/src/dm/impl/DependencyImpl.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/dm/src/dm/impl/DependencyImpl.java Sun Mar  9 22:49:07 2014
@@ -88,6 +88,7 @@ public class DependencyImpl implements D
 	protected void addDependency(Event e) {
 		m_dependencies.add(e);
 		m_available = true;
+		
 		switch (m_component.getComponentState()) {
 		case WAITING_FOR_REQUIRED:
 		    if (isRequired()) {
@@ -100,6 +101,7 @@ public class DependencyImpl implements D
 		            if (m_add != null) {		       
 		                invoke(m_add, e);
 		            }
+		            m_component.updateInstance(this);
 		        } else {
 		            m_component.handleChange();
 		        }
@@ -122,7 +124,8 @@ public class DependencyImpl implements D
         case INSTANTIATED_AND_WAITING_FOR_REQUIRED:
             if (m_change != null && isRequired() && !isInstanceBound()) {
                 invoke(m_change, e);
-            }
+            }     
+            m_component.updateInstance(this);
             break;
         case TRACKING_OPTIONAL:
             if (m_change != null) {
@@ -145,6 +148,7 @@ public class DependencyImpl implements D
                 if (m_remove != null) {
                     invoke(m_remove, e);
                 }
+                m_component.updateInstance(this);
             }
             break;
         case TRACKING_OPTIONAL: