[jboss-dev-forums] [JBoss OSGi Development] - Invalid delivery of framework events

thomas.diesler@jboss.com do-not-reply at jboss.com
Thu Aug 27 08:49:56 EDT 2009


https://jira.jboss.org/jira/browse/JBOSGI-140

Although a listener is associated with a bundle context (i.e. must get removed when the bundle gets uninstalled) the events must get delivered to the listeners that are associated with the framework.

sysContext.addBundleListener(listenerA);

Bundle bndA = sysContext.install("bundleA.jar");
bndA.getBundleContext()..addBundleListener(listenerB);

Bundle bndB = sysContext.install("bundleB.jar");
bndB.uninstall();

Both listenerA and listenerB must see the BundleEvents for bundleB.

This delivery pattern is the basis of the much used "Extender Pattern"


View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4252048#4252048

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4252048



More information about the jboss-dev-forums mailing list