[jdom-interest] Serialization
Noel Grandin
noel at peralex.com
Mon Feb 13 01:05:58 PST 2012
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/youraddr@yourhost.com
>
Disclaimer: http://www.peralex.com/disclaimer.html
More information about the jdom-interest
mailing list