You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xerces.apache.org by ki...@prusec.com on 2000/03/22 18:17:50 UTC

[Xerces-J] Serializable Documents

I noticed that DocumentImpl implements Serializable (as does NodeImpl), but
several other classes (like DocumentTypeImpl) don't. I'm trying to send a
DocumentImpl back form an EJB server, and obviously it's not working. I'm
assuming that the preferred method of doing this is just to use the
serializers.  I was hoping to avoid reconstructing the DOM tree. Any
thoughts?

Kito D. Mann
Virtua Communications Corp.



Re: [Xerces-J] Serializable Documents

Posted by Arkin <ar...@exoffice.com>.
> Anyway, I think it's more efficient to write the document to
> XML form, serialize *that*, and reparse it on the other end
> than to use Java serialization of Objects. The standard
> Serializable format on the wire is huge.

And not as efficient as people would think due to the use of reflection.

arkin

> 
> --
> Andy Clark * IBM, JTC - Silicon Valley * andyc@apache.org
> 
>   ------------------------------------------------------------------------
>                         Name: Serializable.java
>    Serializable.java    Type: application/x-unknown-content-type-java_auto_file
>                     Encoding: base64

-- 
----------------------------------------------------------------------
Assaf Arkin                                           www.exoffice.com
CTO, Exoffice Technologies, Inc.                        www.exolab.org

Re: [Xerces-J] Serializable Documents

Posted by Andy Clark <an...@apache.org>.
kito_mann@prusec.com wrote:
> I noticed that DocumentImpl implements Serializable (as does NodeImpl), but
> several other classes (like DocumentTypeImpl) don't. I'm trying to send a
> DocumentImpl back form an EJB server, and obviously it's not working. I'm
> assuming that the preferred method of doing this is just to use the
> serializers.  I was hoping to avoid reconstructing the DOM tree. Any
> thoughts?

I don't understand this one because I am able to serialize a 
document (the standard Serializable way) and read it back in 
again w/o errors. Take a look at the sample program I've
attached to this message.

What is your EJB server doing differently about serializing
these objects?

Anyway, I think it's more efficient to write the document to
XML form, serialize *that*, and reparse it on the other end 
than to use Java serialization of Objects. The standard
Serializable format on the wire is huge.

-- 
Andy Clark * IBM, JTC - Silicon Valley * andyc@apache.org