Search code examples
javareflectionosgibndtools

How to access bundle in OSGi/Bndtools that only referenced by reflections?


I made a bundle from owlim-lite with bndtools and added all necessary dependencies, so that the OBR-resoultion works fine. Sesame (Semantic Web Repository) should use owlime-lite, but it accesses owlime-lite only per reflection. How could I do this with OSGi/Bndtools?


Solution

  • The only solution is to make it a fragment of the Sesame ... reflection bypasses the Java type safety features which makes it impossible to do modularity ... A fragment becomes part of the Sesame bundle, giving it full (non modular) access to the owl bundle.