You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by ri...@apache.org on 2006/01/23 22:29:55 UTC
svn commit: r371676 -
/incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/ServiceRegistry.java
Author: rickhall
Date: Mon Jan 23 13:29:52 2006
New Revision: 371676
URL: http://svn.apache.org/viewcvs?rev=371676&view=rev
Log:
Fixed a bug in my last patch...I was forgetting to remove the bundle
from the service registry after unregistering all of its services.
Modified:
incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/ServiceRegistry.java
Modified: incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/ServiceRegistry.java
URL: http://svn.apache.org/viewcvs/incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/ServiceRegistry.java?rev=371676&r1=371675&r2=371676&view=diff
==============================================================================
--- incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/ServiceRegistry.java (original)
+++ incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/ServiceRegistry.java Mon Jan 23 13:29:52 2006
@@ -84,7 +84,8 @@
/**
* This method retrieves all services registrations for the specified
* bundle and invokes <tt>ServiceRegistration.unregister()</tt> on each
- * one.
+ * one. This method is only called be the framework to clean up after
+ * a stopped bundle.
* @param bundle the bundle whose services should be unregistered.
**/
public void unregisterServices(Bundle bundle)
@@ -101,6 +102,9 @@
{
regs[i].unregister();
}
+
+ // Now remove the bundle itself.
+ m_serviceRegsMap.remove(bundle);
}
public synchronized List getServiceReferences(String className, Filter filter)