Re: Serialization

Noel Grandin <[email protected]>
Newsgroups gmane.comp.java.jdom.general
Message-ID <[email protected]>
I can see serialisation of JDOM objects being useful for RPC protocols 
like RMI and EJB.

I often find it extremely convenient being able to simply return a 
complex object from an application server to a client program.

On 2012-02-13 01:13, Rolf Lear wrote:
> Hi all.
>
> I have only limited experience with Java serialization. My experiences 
> in the past have always been ugly, but I have never been expert enough 
> in it to be opinionated...
>
> I have been trying to remedy that now, though, and I have come to the 
> conclusion that JDOM still has broken serialization. The problems I 
> see are:
>
> 1. we rely on a hodge-podge of serialization mechanisms to implement it.
> 2. we mark 'Filter' and all the Filter subclasses as being 
> serializable, why?
> 3. We have no control of how any sublcasses of our classes implement 
> serialization.
>
> Fundamentally, XML is specifically designed to make serialization of 
> information easy....
>
> The whole purpose of JDOM is to make it easy to serialize and 
> deserialize (and inspect and change) XML. Why are we also implementing 
> native Java serialization?
>
> So, it is my (currently) uninformed opinion that we should strip the 
> Serialization from JDOM entirely.
>
> If people can find convincing reasons to make JDOM serializable, it is 
> my opinion that it should be implemented as a simple call to 
> XMLOutputter.output(....) to convert the JDOM to a stream (and a 
> reverse ability to parse the results....). This will satisfy any 
> subclassing mechanisms....
>
> Finally, if there is a convincing reason why that would be 
> inappropriate too, then I think the right answer would be to replace 
> the current serialization process with a redesigned and more robust one.
>
> So, I am looking for feedback....
>
> does anyone use Java Serialization on JDOM objects?
>
> Why?
>
> Examples?
>
>
>
> Thanks
>
> Rolf
> _______________________________________________
> To control your jdom-interest membership:
> http://www.jdom.org/mailman/options/jdom-interest/[email protected]
>

Disclaimer: http://www.peralex.com/disclaimer.html


_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.