Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Discussion of Classloaders for (de) serialization
Discussion of Classloaders for (de) serialization [message #46201] Thu, 16 December 2004 03:11
Eclipse UserFriend
Originally posted by: slewis.composent.com

Hello,

I have a plugin that uses object serialization to serialize object
instances, send them over the wire and deserialize object instances from
remote Eclipse sessions using the same plugin. What I would like to do
is to allow other plugins (clients) to serialize/deserialize instances
of their classes via my plugin.

The problem with this is deserialization and the OSGI classloader
structure. When my plugin tries to deserialize an object serialized by
some remote process it needs to load the class of the target
object...and won't be able to because the class was loaded by a
classloader other than the one from my plugin. That is, the receiving
side won't be able to find the class of the object received, because the
classloader used will only have my plugin's classes available.

I could write an extension point for my plugin so that client plugins
could specify packages/classes...and then have my plugin use the
client's classloader for loading appropriate classes (by extending
ObjectInputStream and overriding appropriate methods). Is this the most
natural way to accomplish this? Is there some discussion of handling
object serialization/deserialization with Equinox that presents other
alternatives?

Thanksinadvance for any pointers and/or discussion.

Scott
Previous Topic:Problem with Classloading and Bundles
Next Topic:Info on fragments implementation?
Goto Forum:
  


Current Time: Thu Dec 26 15:33:52 GMT 2024

Powered by FUDForum. Page generated in 0.06790 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top