Bundle dependencies at uninstall [message #51226] |
Thu, 20 October 2005 19:23  |
Eclipse User |
|
|
|
Ensuring bundle dependencies at resolution time is easy. However, OSGi
doesn't seem to provide a way to ensure that required bundles are not
removed if they are actively being depended upon. It provides the
PackageAdmin refreshBundles() method, but this is called after a bundle is
updated or removed. While removing a bundle doesn't actually remove code
in use by other bundles, there are other non-code dependencies that could
be removed. Is there a way to have OSGi refuse to unload a bundle being
depended upon, or cascade the unloading of all depending bundles (E.g., if
Bundle B depends on Bundle A, and I request to unload bundle A, first
unload bundle B, then A)?
Any ideas?
Thanks,
Jeremy
|
|
|
Re: Bundle dependencies at uninstall [message #51364 is a reply to message #51226] |
Fri, 21 October 2005 21:03  |
Eclipse User |
|
|
|
Originally posted by: jeff_nospam_mcaffer.ca.ibm.com
Interesting problem. I don't believe there is any way of restricting the
unload. A management agent could of course do this. One problem is that
you mention non-code dependencies. So does this mean the dependencies are
NOT in the manifest? If so, how would someone compute about them? If htey
are in the manifest then a management agent could use the State/Resolver API
to models the configuration and decide on an uninstall plan that would have
the characteristics you outline.
Jeff
"Jeremy Volkman" <jvolkman@gmail.com> wrote in message
news:ae1c13c274f4f1013486249d3cd43c61$1@www.eclipse.org...
> Ensuring bundle dependencies at resolution time is easy. However, OSGi
> doesn't seem to provide a way to ensure that required bundles are not
> removed if they are actively being depended upon. It provides the
> PackageAdmin refreshBundles() method, but this is called after a bundle is
> updated or removed. While removing a bundle doesn't actually remove code
> in use by other bundles, there are other non-code dependencies that could
> be removed. Is there a way to have OSGi refuse to unload a bundle being
> depended upon, or cascade the unloading of all depending bundles (E.g., if
> Bundle B depends on Bundle A, and I request to unload bundle A, first
> unload bundle B, then A)?
>
> Any ideas?
>
> Thanks,
> Jeremy
>
|
|
|
Powered by
FUDForum. Page generated in 0.27422 seconds