felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gjøran Voldengen <gjor...@gmail.com>
Subject PACKAGES_REFRESHED events upon Bundle.uninstall() and Bundle.update() do not contain the correct bundle reference(?)
Date Mon, 08 Aug 2011 14:54:42 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message