This is the mail archive of the kawa@sourceware.cygnus.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Serializing closures


Hi. A bit of a tough one... I'm trying to do something with
mobile agents which carry Scheme closures around with them. I've just
started making things mobile when I noticed that none of the kawa/gnu -
related classes are serializable. This, for the most part, is not a
problem, I think. All that is needed is adding
"implements java.io.Serializable" to some of the code, which I did.
However, the one irritating problem is this: class members of type
java.lang.reflect.Field are not serializable.

I thought of getting around this by overriding Java's default serializing
mechanism: When class Foo with a Field member x is serialized, x's 
name and related Class object are stored. When class Foo is de-serialized,
x's Class and name are deserialized, and x is reconstructed from this
info.

My question is: Are there any foreseeable problems with this idea. Also,
which classes having Field members are needed at runtime, and for which
this scheme need be applied?

Thanks for any help. My use of Scheme in this project depends on this
fateful issue :)

Ittai



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]