[jdom-interest] org.jdom.Namespace not implementing Serializable?
jools at jools.org
Thu Jul 20 11:31:51 PDT 2000
> 1. Should Namespace be Serializable? I don't think so - the javadoc says
> that it is not just a namespace - it is also a factory for creating them.
It's still an issue, there was a discussion about it, check the archives.
> 2. Anybody got any idea why RMI tries to serialize Namespace in the first
> place when I'm only trying to pass around an instance of a Document (which
> contains no references to Namespace)?
A Document contains references to Element, which in turn has references to
Namespace. For the object to be serialized all the objects it references
to must also be serializable.
Can I suggest that you serialize the document into a String and then send
that over the wire. The client can then create a JDOM object from the
String using the SAXBuilder class.
More information about the jdom-interest