fragment « osgi « Java Enterprise Q&A

1. OSGi fragments: Patching bugs in Eclipse plug-ins

After hearing about OSGi fragments, I was wondering: Can I use a fragment to inject a patch, that is, replace an existing class in an existing, signed bundle? Is there documentation how to ...

2. How to create an osgi fragment with Bnd?

Today I had a deeper look inside the bndTools for Eclipse. I had a good start, but I ask myself if it is possible to create osgi fragments with ...

3. How can I access an instance method/property of a Host from Test Bundle Fragment?

I have a bundle test.Bundle1 that have some properties fulfilled by Blueprint injections. I've created one test fragment whose Host is test.Bundle1 and I would like to obtain myClassA instantiated singleton ...

4. Can OSGi fragments have other fragments as hosts?

Is this legal? MANIFEST.MF for org.fragment1 ( is a normal bundle, not a fragment):

Bundle-SymbolicName: org.fragment1
MANIFEST.MF for org.fragment2:
Bundle-SymbolicName: org.fragment2
Fragment-Host: org.fragment1
Or should org.fragment2 instead have

5. Constraints from the fragment conflict with the host

I am trying to extend the imports of bundle A from bundle B using Fragment-Host. In bundle B I have this line: Fragment-Host: and in bundle B's Import-Package I have added the ...

6. Installing a fragment requires a refresh on the host, how can this be avoided?

I have two bundles: bundle A and bundle B which is configured as a fragment of bundle A using: Fragment-Host: Whenever I install bundle B it fails to start (INSTALLED) and therefore ...

7. Fragment dependency on other fragments

I have a plugin which is the host of fragment A & B. I export a package using Export-Package header from fragment A. Hopefully I can import that package in fragment ...