• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

OSGI deserialization

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I cannot find a satisfying solution to a simple looking problem for quite a while.

The condensation of the problem:
Bundle A
the producer stores objects as xml files (e.g. with XStream)
it exports the bundle.a package which contains the interface Item
it contains a private implementation package bundle.a.impl which contains the item implementation class ItemImpl

Bundle B
the consumer needs to load and process Item instances
therefor it imports package bundle.a which contains the Item interface

Problem: loading Item instances in bundle B leads always to ClassNotFoundExceptions

Even working with the last resort DynamicImport-Package: * does not solve the problem since it imports only exported packages.
To expose the implementation classes of the Item would not really work since even bundle A doesn't know about the exact implementation class.

From some hints in the internet I got the feeling that this issue is not really solved for OSGI. Is there any solution known? How deal others with that issue e.g. ActiveMq which claims to be OSGI compliant.
Or am I just on the wrong way?
CAUTION! Do not touch the blades on your neck propeller while they are active. Tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!