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

Hmm. Fragments seem way too powerful. We seem to hopping between two
thougts. I always liked the localization use case which seems simple
and straightforward. A fragment is not a bundle and should not try
to become one in my opinion. I agree that it should not be allowed to
to do anything outside the scope of its host.

KISS!

Kind regards,

     Peter Kriens


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

TW> This can lead to unpredictable behaviorwith respect to
TW> loading classes and resources from a host while it is
TW> resolved. For example, a bundle X includes a package foo and does
TW> not importany packages or require any bundles.  Bundle X is
TW> resolved and startedwithin the Framework.  Fragment Y is a
TW> fragment to Bundle X and itrequires Bundle Z which provides
TW> package foo.  If Fragment Y is attachedto a resolved Bundle X then
TW> Bundle X will all of a sudden start loadingpackage foo from Bundle
TW> Z because it was required by Fragment Y.

TW> I suggest the Framework should not allowa fragment to attach
TW> to a resolved or active host bundle if the fragmentimports or
TW> requires anything that is not already imported or required bythe
TW> resolved host bundle.  If a host bundle is refreshed then it
TW> willbecome unresolved and re-resolved, at that time the new
TW> fragment bundleshould be attached to the host bundle.

TW> Thomas Watson


-- 
Peter Kriens                              Mob. +46705950899
34 Place René Nelli                       Tel. +33467871853
34670 Baillargues, France                 AOL: pkriens