I am referring to framework version 3.2.2

When I receive a PACKAGES_REFRESHED event, it would be very convenient to
separate between the events that stem from individual bundles being
uninstalled or updated, and the event that is returned after calling
PackageAdmin.refreshPackages().

However, this is not possible, as event.getBundle() always returns the Felix
object itself:

Felix.uninstallBundle(BundleImpl)

- calls refreshPackages(new BundleImpl[] { bundle })
  (Felix line: 2461, the correct bundle is passed in an array)

- calls fireFrameworkEvent(FrameworkEvent.PACKAGES_REFRESHED, this, null);
  (Felix line: 3732, the second argument should have been the bundle, but
instead is the Felix object itself)

One solution could be to create a new method refreshPackages(BundleImpl),
that takes a single bundle as arg, so that the correct bundle can be passed
to fireFrameworkEvent() from Felix.uninstallBundle/updateBundle.

Regards,
Gjoran Voldengen

Reply via email to