Fixed an issue with not all callbacks being invoked on service compositions, introduced as part of the refactoring of Friday.
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@930846 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/dependencies/DependencyBase.java b/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/dependencies/DependencyBase.java
index ac70c71..3728ed3 100644
--- a/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/dependencies/DependencyBase.java
+++ b/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/dependencies/DependencyBase.java
@@ -30,14 +30,16 @@
}
protected void invokeCallbackMethod(Object[] instances, String methodName, Class[][] signatures, Object[][] parameters) {
- try {
- InvocationUtil.invokeCallbackMethod(instances, methodName, signatures, parameters);
- }
- catch (NoSuchMethodException e) {
- m_logger.log(Logger.LOG_DEBUG, "Method '" + methodName + "' does not exist. Callback skipped.");
- }
- catch (Exception e) {
- m_logger.log(Logger.LOG_DEBUG, "Invocation of '" + methodName + "' failed.", e);
+ for (int i = 0; i < instances.length; i++) {
+ try {
+ InvocationUtil.invokeCallbackMethod(instances[i], methodName, signatures, parameters);
+ }
+ catch (NoSuchMethodException e) {
+ // if the method does not exist, ignore it
+ }
+ catch (Exception e) {
+ m_logger.log(Logger.LOG_WARNING, "Invocation of '" + methodName + "' failed.", e);
+ }
}
}
}