On 4/16/10 14:07, Norbert Somlai wrote:
Richard, Guo,
Thanks for the reply. The Felix version is 2.0.4.
I'm not perfectly familiar with fragments yet so it may be a design mistake
anyway. This fragment bundle contains some common JAR libraries we plan to
import into multiple bundles so we don't have to add them to each of our
bundles.
So we created a fragment bundle, added the JARs to the bundle classpath and
exported them as you can see in the manifest. Is this the right way to do
this? What should be the host bundle in this case?
In theory, you can use system bundle framework extensions this way, but
I'd say it wasn't the primary purpose. If you are going to use this
approach, then you still need to import these packages in the bundles
that are going to use them, since a system bundle extension attaches to
the system bundle, not to the clients.
However, it seems this entire approach is incorrect. The primary purpose
of bundles is to share common JAR libraries, so why don't you just
package them as a normal bundle and import them in the client bundles?
-> richard
Richard S. Hall wrote:
The above is a system bundle framework extension, which automatically
gets attached to the system bundle when it is installed; this is why you
see if get resolved immediately. However, the fact that it is attached
to nothing is sort of a missed special case since system bundle
extensions are handled differently than normal fragments. This message
should be improved in the framework.
If you are trying to create a fragment for SampleClient, you should have
something like this in the fragment metadata:
Fragment-Host:<symbolic-name-of-sample-client>
This will cause the fragment to get attached to SampleClient, rather
than the system bundle.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
For additional commands, e-mail: users-h...@felix.apache.org