felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1022553 - /felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/dependencies/ServiceDependencyImpl.java
Date Thu, 14 Oct 2010 14:45:36 GMT
Author: marrs
Date: Thu Oct 14 14:45:36 2010
New Revision: 1022553

URL: http://svn.apache.org/viewvc?rev=1022553&view=rev
Log:
More fixes for instance bound callbacks.

Modified:
    felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/dependencies/ServiceDependencyImpl.java

Modified: felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/dependencies/ServiceDependencyImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/dependencies/ServiceDependencyImpl.java?rev=1022553&r1=1022552&r2=1022553&view=diff
==============================================================================
--- felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/dependencies/ServiceDependencyImpl.java
(original)
+++ felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/dependencies/ServiceDependencyImpl.java
Thu Oct 14 14:45:36 2010
@@ -422,6 +422,9 @@ public class ServiceDependencyImpl exten
         for (int i = 0; i < services.length; i++) {
             DependencyService ds = (DependencyService) services[i];
             if (makeAvailable) {
+                if (ds.isInstantiated() && isInstanceBound() && isRequired())
{
+                    invokeAdded(ds, ref, service);
+                }
                 // The dependency callback will be defered until all required dependency
are available.
                 ds.dependencyAvailable(this);
                 if (!isRequired()) {
@@ -469,7 +472,7 @@ public class ServiceDependencyImpl exten
             DependencyService ds = (DependencyService) services[i];
             if (makeUnavailable) {
                 ds.dependencyUnavailable(this);
-                if (!isRequired()) {
+                if (!isRequired() || (ds.isInstantiated() && isInstanceBound()))
{
                     invokeRemoved(ds, ref, service);
                 }
             }



Mime
View raw message