commit | 3e17a5f31d8510cbe42afb697d9a3ab0f60cc08f | [log] [tgz] |
---|---|---|
author | Clement Escoffier <clement@apache.org> | Thu Jul 03 14:33:21 2008 +0000 |
committer | Clement Escoffier <clement@apache.org> | Thu Jul 03 14:33:21 2008 +0000 |
tree | bae338b0058dca2712d9848e462ebbc674624572 | |
parent | 8ea4848ce7659c3b1c2653b2291cd443c7c5eec5 [diff] |
Fix the issue Felix-613 The extender pattern handler may not call the callback when a managed bundle is leaving. This issue is now solved, the handler always call the method regardless the instance state. Indeed, the instance must release all references on the leaving bundles. git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@673689 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/ipojo/extender.pattern.handler/src/main/java/org/apache/felix/ipojo/handler/extender/ExtenderManager.java b/ipojo/extender.pattern.handler/src/main/java/org/apache/felix/ipojo/handler/extender/ExtenderManager.java index 69fdea3..fe8cea3 100644 --- a/ipojo/extender.pattern.handler/src/main/java/org/apache/felix/ipojo/handler/extender/ExtenderManager.java +++ b/ipojo/extender.pattern.handler/src/main/java/org/apache/felix/ipojo/handler/extender/ExtenderManager.java
@@ -85,9 +85,9 @@ String header = (String) headers.get(m_extension); if (header != null) { synchronized (this) { - m_bundleSet.add(bundle); + m_bundles.add(bundle); } - try { + try { // Call the callback outside the synchronized block. m_onArrival.call(new Object[] {bundle, header}); } catch (NoSuchMethodException e) { m_handler.error("The onArrival method " + m_onArrival.getMethod() + " does not exist in the class", e);