The RequiredBundle#getRequiringBundles() is only intended to return the bundles wired through Require-Bundle constraints. A RequiredBundle object is removal pending as soon as the bundle content it represents has been updated or uninstalled. The same rule for removal pending applies to ExportedPackage objects. As soon as the bundle content which exports the package has been updated or uninstalled then the ExportedPackage becomes stale. This is related to the class loader which loads the bundle content. If this class loader becomes marked for removal because of an update or uninstall then all exported packages available for load from that bundle class loader must become stale as well as the RequiredBundle object.
Hope that helps. Tom |------------> | From: | |------------> >--------------------------------------------------------------------------------------------------------------------------------------------------| |"Alan Keane" <[email protected]> | >--------------------------------------------------------------------------------------------------------------------------------------------------| |------------> | To: | |------------> >--------------------------------------------------------------------------------------------------------------------------------------------------| |<[email protected]> | >--------------------------------------------------------------------------------------------------------------------------------------------------| |------------> | Date: | |------------> >--------------------------------------------------------------------------------------------------------------------------------------------------| |12/04/2009 04:09 AM | >--------------------------------------------------------------------------------------------------------------------------------------------------| |------------> | Subject: | |------------> >--------------------------------------------------------------------------------------------------------------------------------------------------| |[osgi-dev] RequiredBundle clarification - PackageAdmin spec | >--------------------------------------------------------------------------------------------------------------------------------------------------| Hi, Apologies if this is clearly stated somewhere but I couldn't find an explicit statement in the spec.. I just want to clarify something in relation to the RequiredBundle#getRequiringBundles() method. Should this method return all bundles that are currently wired to the underlying bundle as a result of both Require-Bundle and explicit Import-Package statements? >From the spec: "The information about a required bundle provided by this object may change. A RequiredBundle object becomes stale if an exported package of the bundle it references has been updated or removed as a result of calling PackageAdmin.refreshPackages()). If this object becomes stale, its getSymbolicName() and getVersion() methods continue to return their original values, isRemovalPending() returns true, and getBundle() and getRequiringBundles() return null." To me, this implies that wiring as a result of explicit Import-Package statements should also be considered. If not, then should the RequiredBundle object only become stale when the bundle it represents no longer exports any packages.. As long as it continues to export 1+ packages then any bundle previously wired as a result of Require-Bundle would remain a valid requiring bundle. Thanks, Alan _______________________________________________ OSGi Developer Mail List [email protected] https://mail.osgi.org/mailman/listinfo/osgi-dev
<<inline: graycol.gif>>
<<inline: ecblank.gif>>
_______________________________________________ OSGi Developer Mail List [email protected] https://mail.osgi.org/mailman/listinfo/osgi-dev
