Am 15.12.14 um 18:25 schrieb Stefan Seifert:
> in SLING-4226 encountered a strange bundle deployment problem in integration 
> tests which I could reproduce with a few steps in launchpad and webconsole 
> [1].
> 
> the generic steps are:
> 1. bundle B depends on exports of bundle A
> 2. bundle A is uninstalled - B is still running
> 3. bundle B can even be stopped/started, the dependencies to A still resolve 
> although A is uninstalled and no longer visible in webconsole
> 4. after stopping/starting the launchpad/OSGi container B cannot be started 
> due to missing dependency A - this is expected
> 
> how it this possible?
> in what status is A after uninstalling?
> shouldn't be bundle B stopped automatically by OSGi when A is uninstalled, or 
> at least when then bundle is restarted?
> 
At least at step 2 bundle B is still wired to A until a package refresh
is done, so resources (class loader) of A is really only freed after
package refresh (if another bundle is wired to A).
For 3. as start/stop does not rewire bundle B, its still the same.

So, general rule is: if you uninstall a bundle, make sure to invoke a
package refresh, unless you want other bundles to continue to be wired
to the uninstalled instance.

Carsten
-- 
Carsten Ziegeler
Adobe Research Switzerland
[email protected]

Reply via email to