On 1/5/12 11:16 , Lance Frohman wrote:
My project is using Apache Felix, and we are having a problem
with a split package. We are using xml with the regular java classes (jre),
so we need to add org.w3c.dom to the Import-Package. We added some
functionality that uses Apache Batik, but the batik-ext.jar has some
classes in org.w3c.dom also. We tried both making batik into bundles using
the bnd tool on the jar files, and just including the batik .jar files in
the
classpath, but neither method works. I have the OSGi in action book,
but it does not mention this situation, just split packages between two
bundles. What is the best way to resolve this problem?

Like described in section 5.3, you could use Require-Bundle to aggregate the split package. It is sort of ugly, since you'd have to Require-Bundle the system bundle, but it would work. You can try to structure it nicely so you have one bundle that requires the system bundle and includes the additional org.w3c.dom classes and then exports the org.w3c.dom. Modify the system bundle export of org.w3c.dom to some arcane mandatory attribute so no one will use that one, then every import for org.w3c.dom should go to the bundle you create, which delegates to the system bundle for most of the classes and to itself for the remaining classes in org.w3c.dom.

-> richard


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
For additional commands, e-mail: users-h...@felix.apache.org

Reply via email to