Author: thomas.diesler(a)jboss.com
Date: 2009-08-28 02:45:37 -0400 (Fri, 28 Aug 2009)
New Revision: 92908
Modified:
projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/bundle/AbstractBundleState.java
projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/bundle/OSGiBundleState.java
projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/plugins/FrameworkEventsPluginImpl.java
projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/test/java/org/jboss/test/osgi/bundle/test/BundleContextUnitTestCase.java
Log:
Fix addServiceListener - different filter replaces the listener.
Modified:
projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/bundle/AbstractBundleState.java
===================================================================
---
projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/bundle/AbstractBundleState.java 2009-08-28
06:02:10 UTC (rev 92907)
+++
projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/bundle/AbstractBundleState.java 2009-08-28
06:45:37 UTC (rev 92908)
@@ -40,7 +40,6 @@
import org.jboss.logging.Logger;
import org.jboss.osgi.plugins.facade.api.BundleStoragePlugin;
import org.jboss.osgi.plugins.facade.api.FrameworkEventsPlugin;
-import org.jboss.osgi.plugins.filter.NoFilter;
import org.jboss.osgi.spi.NotImplementedException;
import org.jboss.osgi.spi.metadata.OSGiMetaData;
import org.jboss.osgi.spi.util.ConstantsHelper;
Modified:
projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/bundle/OSGiBundleState.java
===================================================================
---
projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/bundle/OSGiBundleState.java 2009-08-28
06:02:10 UTC (rev 92907)
+++
projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/bundle/OSGiBundleState.java 2009-08-28
06:45:37 UTC (rev 92908)
@@ -37,7 +37,6 @@
import org.jboss.osgi.spi.metadata.OSGiMetaData;
import org.jboss.virtual.VirtualFile;
import org.osgi.framework.AdminPermission;
-import org.osgi.framework.Bundle;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.osgi.framework.BundleException;
Modified:
projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/plugins/FrameworkEventsPluginImpl.java
===================================================================
---
projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/plugins/FrameworkEventsPluginImpl.java 2009-08-28
06:02:10 UTC (rev 92907)
+++
projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/plugins/FrameworkEventsPluginImpl.java 2009-08-28
06:45:37 UTC (rev 92908)
@@ -411,7 +411,7 @@
return false;
ServiceListenerRegistration other = (ServiceListenerRegistration)obj;
- return other.listener.equals(listener);
+ return other.listener.equals(listener) && other.filter.equals(filter);
}
}
}
\ No newline at end of file
Modified:
projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/test/java/org/jboss/test/osgi/bundle/test/BundleContextUnitTestCase.java
===================================================================
---
projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/test/java/org/jboss/test/osgi/bundle/test/BundleContextUnitTestCase.java 2009-08-28
06:02:10 UTC (rev 92907)
+++
projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/test/java/org/jboss/test/osgi/bundle/test/BundleContextUnitTestCase.java 2009-08-28
06:45:37 UTC (rev 92908)
@@ -296,9 +296,7 @@
bundleContext.addServiceListener(this, "(c=d)");
bundleContext.addServiceListener(this, "(a=b)");
- // [TODO]
- System.out.println("FIXME: assertServiceLifecycle");
- // assertServiceLifecycle(bundle, bundleContext, properties, true);
+ assertServiceLifecycle(bundle, bundleContext, properties, true);
bundleContext.removeServiceListener(this);
}
finally
@@ -318,6 +316,7 @@
ServiceRegistration registration =
bundleContext.registerService(BundleContext.class.getName(), bundleContext, properties);
ServiceReference reference = registration.getReference();
+
if (events)
assertServiceEvent(ServiceEvent.REGISTERED, reference);
else
Show replies by date