On Wed, Sep 24, 2008 at 4:32 PM, Fredrik Alströmer <[EMAIL PROTECTED]> wrote:
> The best solution I've come up with so far is to > implement a classloader, mapping methods such as findClass to the > bundles loadClass etc. I think it depends on your use-case. In our cases, the bundle that asks for the deserializing of the stream passes its classloader to the deserializer (in our case a service in another bundle). So, I think the following happens; ClassA[CL1] --uses--> ClassB[CL2] --uses--> ClassC[CL3] CLx = different bundle classloaders. The Bundle for ClassA has a direct visibility to ClassB and must therefor import ClassB. And during deserialization, the CL1 is passed to the deserializer, and upon cl1.loadClass() it will delegate to the CL2 for loading ClassB, which in turn is importing the bundle of CL3 and delegation happens again. I have not had use-cases where random classes are deserialized "on-demand"... Cheers Niclas
_______________________________________________ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev