Thomas Watson wrote:
Hmmm... I stand corrected on my last post about the specification not
allowing bundles to wire to exports from uninstalled bundles. I will
have to look back at the CPEG discussions. I really do remember us
discussing that exports from uninstalled bundles should not be allowed
as wires for newly resolved bundles. Anyone else remember this CPEG
discussion?
I do not recall any addition discussion and I would be against changing
it back to R4 behavior. If the packages are available for use by
existing packages, then it doesn't make sense that they are not also
available for future bundles. The packages are only eliminated when a
refresh occurs.
The reason behind this decision is that refresh should be at the
discretion of the deployer. If you can no longer use the packages, then
it will create unnecessary new class spaces which will make newly
installed bundles immediately incompatible with existing bundles, which
in effect forces a refreshes.
The same is the case for an updated bundle. If I update a bundle that
imports its own packages, then it is possible to wire the updated bundle
to the existing packages to keep everyone compatible.
-> richard
Tom
Inactive hide details for "Alin Dreghiciu" ---07/29/2008 04:09:09
AM---Hi guys, As with my previous post regarding refresh pack"Alin
Dreghiciu" ---07/29/2008 04:09:09 AM---Hi guys, As with my previous
post regarding refresh packages I found another
From:
"Alin Dreghiciu" <[EMAIL PROTECTED]>
To:
"OSGi Alliance - General" <[email protected]>
Date:
07/29/2008 04:09 AM
Subject:
[osgi-dev] Uninstall bundle and exported packages
------------------------------------------------------------------------
Hi guys,
As with my previous post regarding refresh packages I found another
difference between Felix/Equinox/Knopflerfish related to uninstalling
a bundle and availability of exported packages of that bundle. In my
view the specs are not clear enough regarding this aspect.
So:
1. I have bundle A exporting package P
2. I have bundle B importing package P. Bundle B is the only bundle
importing package P.
3. Both bundles are started.
If I uninstall bundle A (just uninstall not refresh) bundle B will
still be started (so resolved) as expected and specs are clear about
this.
Then I uninstall bundle B and install again bundle B:
Felix: bundle B will be resolvable
Equinox/Knopflerfish: bundle B will not be resolvable and is missing
the imports of bundle A
Looking at the specs:
1. 4.0.1, section 4.3.8: "Packages of uninstalled bundles must not be
used by newly installed bundles, but are still used by its importers
until the refreshPackages method has been called or the Framework is
restarted."
2. 4.1.0, section 4.3.11: "If none of the old exports are used, then
the old exports must be removed. Otherwise, all old exports must
remain available for existing bundles and future resolves until the
refreshPackages method is called or the Framework is restarted."
According to 4.0.1 correct behavior is the one from
Equinox/Knopflerfish. According to 4.1.0 I think that Felix is
correct, but I'm not sure what the "old exports" means. Is there a
difference between exports of the uninstalled bundle and the old
exports of uninstalled bundle? And in the context of example above
when bundle B is uninstalled, so there are no more bundles uwing the
package P of bundle A, should the package P still be available for
future resolve?
Note that all of this is in the context on not calling refresh.
Regards,
--
Alin Dreghiciu
http://www.ops4j.org - New Energy for OSS Communities - Open
Participation Software.
http://www.qi4j.org - New Energy for Java - Domain Driven Development.
http://malaysia.jayway.net - New Energy for Projects - Great People
working on Great Projects at Great Places
_______________________________________________
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
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev