Alan Cabrera wrote:
My humble thoughts:

Like any good work of art it is hard to know when enough is enough and it's time to leave the piece as it is. I am worried that what was once a clean and elegant spec will become muddied to support features that, imo, tools should have taken the burden; take required bundles for example.

I couldn't agree more. However...

I'm not aware of the compelling use cases that call for an extension to the number of hosts for a fragment but can think of one, again imo, not so compelling one. This being the patching of a set of bundles with one fragment.

For me, the issue with fragments is not the concept, but the realization of the concept which turned out to be a little ugly. The main use case for fragments was localization, since such info needs to be in the same package as the class being localized. The realization extended beyond this use case. With respect to the issue at hand, I don't know enough about localization to say if it is compelling to have one fragment attach to multiple hosts, but I could imagine a scenario where a suite of bundles somehow package their localizations into shared fragments so that they don't all have to maintain their own copy.

Required bundles are a whole other can of worms...

I'm happy to go into detail as to why I think poorly of this use case if it is the impetus for adding this extension and if this is the appropriate forum.

Well, I don't think this mailing list is reserved purely for praise of the spec, but I guess there isn't much use in crying over spilled milk either. :-)

-> richard


About PackageAdmin.getHosts(), I assume that for the moment it should always return a single host. Just curious, was there a reason to have it still return an array and not a scalar in light of the current cardinality between host and fragment?

Is there a way for me to know what's in the pipeline so that I may put in my 2 cents?


Regards,
Alan

On Oct 2, 2007, at 5:42 AM, BJ Hargrave wrote:

:-)

During R4 spec development we allowed fragments to attach to multiple
hosts. Prior to going final on R4, we changed course and limited fragments to only attach to a single host. The sentence you quote is left over from
when we considered allowing fragments to attach to multiple hosts. Also
see the method signature of PackageAdmin.getHosts where the return type is
an array and not a scalar.

We are currently discussing revisiting that decision. That is, to
potentially allow a fragment to attach to multiple hosts. It would be
useful to get input from the OSGi community on the pros and cons of such a
change.
--

BJ Hargrave
Senior Technical Staff Member, IBM
OSGi Fellow and CTO of the OSGi Alliance
[EMAIL PROTECTED]

office: +1 386 848 1781
mobile: +1 386 848 3788




From:
Alan Cabrera <[EMAIL PROTECTED]>
To:
OSGi Developer Mail List <[email protected]>
Date:
2007-10-02 02:07
Subject:
[osgi-dev] Finding Localization Entries



Hello,

I'm trying to get my head around 3.10.1 Finding Localization
Entries.  The last sentence of the first paragraph confuses me.

"Fragment bundles must delegate the search for a localization entry
to their host bundle with the lowest bundle ID."

Does this mean that fragment bundles can have multiple hosts?


Regards,
Alan

_______________________________________________
OSGi Developer Mail List
[email protected]
http://www2.osgi.org/mailman/listinfo/osgi-dev


_______________________________________________
OSGi Developer Mail List
[email protected]
http://www2.osgi.org/mailman/listinfo/osgi-dev


_______________________________________________
OSGi Developer Mail List
[email protected]
http://www2.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________
OSGi Developer Mail List
[email protected]
http://www2.osgi.org/mailman/listinfo/osgi-dev

Reply via email to