From: Jean-Fran=?ISO-8859-1?B?5w==?=ois Brouillet
Subject: Re: Objects serialization
Date: 
Message-ID: <B8628DB0.3A83%verec@mac.com>
On 9/1/02 3:04, in article ···············@shell01.TheWorld.com, "Kent M
Pitman" <······@world.std.com> wrote:

>>> I recall someone posting here saying that even the Java designers or
>>> some such serious crew of people have recognized (perhaps since the
>>> outset) that their serialization protocol is not as general as it seems.
>>> I wish I could remember the URL they cited to this info.
>> 
>> I used to know precisely, but what I recall is this:
>> 
>> By default, all your fields are serialized / deserialized automatically,
>> with the runtime taking care of not copying shared instances more than
>> once (by maintaining some kind of hashtable of object IDs while
>> serializing).
>> 
>> In the case you have special requirements, you override a readObject(stream)
>> and/or writeObject(stream) and do the passivation / activation yourself.
>> 
>> Finally, I kind of recall that there's a mean to declare some fields
>> "transient" which results in them not being written out, and being
>> initialized to known defaults when reading back.
>> 
>> Anyone less rusty can complete the picture?
> 
> No, you're completely missing my point.

Not exactly ;-)

I was just highlighting how non standard needs could be addressed
by overriding the readObject/writeObject method. I just added a bit
of background around it. That's all.

> I'm not saying there's not a protocol.  I'm saying that the protocol
> does not accomplish what a lot of people think it does.

That's true: Java doesn't do what Lisp expects it to do ;-)
Or, what about: no matter how you look at it, there's always
a feature in language X that language Y doesn't support;
or even: regardless of how slightly hidden my agenda could be,
I'll always find ways to present political issues as technical
matters of the utmost importance ;-)

> Just because it is fully defined does not mean it satisfies everyone's
> real world practical needs.

Yep. It would be much better to come up with a counter example, though:
"in situation so-and-so serialization of object/class <foo> cannot
be done because of such-and-such". Failing that, this sounds too much
like FUD propagation.

> I've seen something written up on the conceptual deficiencies somewhere,
> I think due to something someone posted here.  Perhaps even a pointer
> to a Java FAQ or some such.  I just don't quite remember.  Maybe findable
> in DejaNews (yes, yes, groups.google ... sigh) but I haven't the time
> to search tonight.

How unfortunate! I, for sure, would love to learn this bit, as I'm sure
all the other Java (ex-) practitioners would ...

--
Jean-Fran�ois Brouillet