I am having some difficulty getting a fragment to work as I intend. It has raised a question to my mind that is not answered by various articles on the web.
First, my understanding of a fragment is that it is much like an OSGi Bundle except it doesn't activate in its own right; instead it get's hosted by another bundle. In that way, it could be thought of as an extension to an existing bundle.
Somebody please correct the above if wrong.
Now the main question pertains to the Manifest attributes that often go with articles on fragments and specifically, the Fragment-Host attribute. The Fragment-Host attribute is typically declaring a symbolic bundle name, but what is not clear is:
It seems a basic question, but it isn't really answered, and without getting a working example off the ground I am left questioning which way around it is meant to be. Most people who specify that a fragment is needed and "these are what the manifest should look like" are not declaring this sort of simple information that would greatly clarify matters.
It is (2). The fragment bundle has a Fragment-Host
manifest header which declares the bundle symbolic name of its host bundle. The fragment bundle is "attached" to the host bundle and class loaded by the host bundle's class loader.