10.1. Removing Phantom Bundles
Earlier we learned that the exported packages remain in effect even when the exporting bundle has been updated, stopped, or uninstalled. Although this behavior is deterministic, it does leave behind “zombies”—inaccessible bundles that consume valuable resources. The following user session reveals this situation:
> start jes_path/bundles/log.jar, jes_path/bundles/device.jar > bundles ID STATE LOCATION -- ------ ---------------------------- 0 ACTIVE System Bundle 1 ACTIVE file:jes_path/bundles/log.jar 2 ACTIVE file:jes_path/bundles/device.jar > exportedpackages Package: org.osgi.service.device (0.0.0) Exported by: 2 (file:jes_path/bundles/device.jar) Imported by: 2 (file:jes_path/bundles/device.jar) Package: org.osgi.service.log ...
Get Programming Open Service Gateways with Java Embedded Server™ Technology now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.