commit | 043d5c0fd8eec55706476fdde155fea6fc629849 | [log] [tgz] |
---|---|---|
author | Marcel Offermans <marrs@apache.org> | Thu Oct 14 14:45:36 2010 +0000 |
committer | Marcel Offermans <marrs@apache.org> | Thu Oct 14 14:45:36 2010 +0000 |
tree | 4f8bb9dfffc6141466ba91457d0a665de6cf369d | |
parent | 65b3485b13c4c8eb6f8b152a556064e6e0a25c57 [diff] |
More fixes for instance bound callbacks. git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1022553 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/dependencies/ServiceDependencyImpl.java b/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/dependencies/ServiceDependencyImpl.java index e698a6a..dc7474b 100644 --- a/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/dependencies/ServiceDependencyImpl.java +++ b/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/dependencies/ServiceDependencyImpl.java
@@ -422,6 +422,9 @@ 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 @@ DependencyService ds = (DependencyService) services[i]; if (makeUnavailable) { ds.dependencyUnavailable(this); - if (!isRequired()) { + if (!isRequired() || (ds.isInstantiated() && isInstanceBound())) { invokeRemoved(ds, ref, service); } }