Andrea Keep in mind, when you perform a refresh using PackageAdmin there is a chance that the bundles that depend upon packaged exported by an uninstalled bundle will become INSTALLED. So consider installing the replacement bundles before performing the refresh. This problem is one of the reasons why I recommend that people minimize package dependencies between bundles. Ideally a bundle has zero package dependencies, but that's often not realistic. If you are going to depend upon a package, it's best to depend upon packages of interfaces or simple data-type classes that will rarely change. Ideally you have no dependencies on packages containing interface/service implementations. You should consider using services to create loosely coupled, and dynamic, dependencies upon implementation classes. Bundles that provide services can be freely installed and uninstalled without having to perform any refreshing since the OSGi service registry and/or Declarative Services take care of notifying dependents of service changes.
These things are covered extensively here: http://equinoxosgi.org/ Thanks Simon From: Andrea Zoppello <[email protected]> To: OSGi - Dev <[email protected]> Date: 07/29/2010 06:42 AM Subject: [osgi-dev] A question about UNINSTALL Operation... Sent by: [email protected] Hi All, I've a question about uninstalling bundles. Suppose i've a simple situation where i've two bunldes "A" and "B" and B is importing some packages from bundle "A". My doubt is about "what should" happens to the state of "B" when i'm going to uninstall bundle "A". I was ( wrongly ) thinking that the container had automatically put B in "INSTALLED" state, because A was uninstalled. But i discovered that this would not happen ( at least with equinox) until i do a refresh??? So the question is, which is the right behaviour of the OSGi container in that case?? Should i need a refresh anyway?? Thx Andrea _______________________________________________ OSGi Developer Mail List [email protected] https://mail.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________ OSGi Developer Mail List [email protected] https://mail.osgi.org/mailman/listinfo/osgi-dev
