[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] Attaching fragments to resolved hosts.


I agree. Predictability is very important.

BJ Hargrave

Senior Software Engineer, IBM, Austin, TX
OSGi Fellow and CTO of the
OSGi Alliance
hargrave@xxxxxxxxxx  904/5D-003 T/L 678-9938
Office: +1 512 838 9938 Mobile: +1 512 785 7386
[
vcard]


Thomas Watson/Austin/IBM@IBMUS
Sent by: equinox-dev-admin@xxxxxxxxxxx

2004-03-29 10:20 AM

Please respond to
equinox-dev

To
equinox-dev@xxxxxxxxxxx
cc
Subject
[equinox-dev] Attaching fragments to resolved hosts.






In the Equinox OSGi Framework we allow a fragment to attach itself to a resolved host only if it can logically be appended to the end to of the the bundle classpath of the host.  But should we allow fragments to be attached to resolved or active hosts if the fragment imports additional packages or requires additional bundles?  The current Equinox Framework allows for this to happen.


This can lead to unpredictable behavior with respect to loading classes and resources from a host while it is resolved.  For example, a bundle X includes a package foo and does not import any packages or require any bundles.  Bundle X is resolved and started within the Framework.  Fragment Y is a fragment to Bundle X and it requires Bundle Z which provides package foo.  If Fragment Y is attached to a resolved Bundle X then Bundle X will all of a sudden start loading package foo from Bundle Z because it was required by Fragment Y.


I suggest the Framework should not allow a fragment to attach to a resolved or active host bundle if the fragment imports or requires anything that is not already imported or required by the resolved host bundle.  If a host bundle is refreshed then it will become unresolved and re-resolved, at that time the new fragment bundle should be attached to the host bundle.


Thomas Watson