[jdom-interest] How about Namespace serialization

Bill Woodward wpwood at saifa.net
Sun May 18 16:08:30 PDT 2003


Elliotte Rusty Harold said:
> At 2:29 PM -0800 3/27/03, Jason Hunter wrote:
>
>>As we just noticed, the additional namespaces in the JDOM element
>>are transient. This is bad.
>

This reminded me to ask about a different serialization problem.  Is there
any reason that the Namespace class itself is not serializable?  I have a
class that I need to serialize.  It uses JDOM internally, storing a
Document, root Element, and Namespace as private variables.  However, I
get a serialization error when I try to send it over RMI because it the
Namespace class is not declared serializable.

I get around the problem by declaring the private Namespace variable as
transient, but it seems odd that I can serialize everything else, but not
the Namespace.

No, should Namespace implement serializable?

- Bill

      /------------------------------------\
     /   Bill Woodward (wpwood at saifa.net)   \
     \        http://www.saifa.net          /
      \------------------------------------/



More information about the jdom-interest mailing list