AW: [jdom-interest] org.jdom.Namespace not implementing Serializa ble?
Peterbauer Karl
Peterbau at kapsch.net
Fri Jul 21 02:42:27 PDT 2000
Please note that the 64k string limit has been eliminated in Sun's JDK 1.3, at least they claim to, see http://java.sun.com/j2se/1.3/docs/guide/rmi/relnotes.html
(Clearly this is no solution if you have older or other VM's out in the field...)
Personally I would appreciate that any Object (Document, Element) which implements java.io.Serializable can in fact be serialized ;-)
In case of RMI, passing a Document as String clearly undermines the goal of RMI, and if the client is an Applet, it has to load yet another jar....
-Karl
> -----Urspr> üngliche Nachricht-----
> Von: Humphrey Sheil [SMTP:Humphrey.Sheil at kadius.com]
> Gesendet am: Freitag, 21. Juli 2000 10:14
> An: 'Jools Enticknap'
> Cc: 'jdom-interest at jdom.org'
> Betreff: RE: [jdom-interest] org.jdom.Namespace not implementing Serializa ble?
>
> Thanks,
>
> I should have traversed the entire object graph to find this.
>
> I was hoping to avoid having to serialize the Document to a string. The JDK
> has imposed a hard 64k limit on the serialized form of a string (in
> java.io.DataOutputStream), since it uses the first two bytes of the
> underlying array to store the size of the array. Any bigger and a
> UTFDataFormatException will be thrown.
>
> Humphrey
>
> -----Original Message-----
> From: Jools Enticknap [mailto:jools at jools.org]
> Sent: 20 July 2000 19:32
> To: Humphrey Sheil
> Cc: 'jdom-interest at jdom.org'
> Subject: Re: [jdom-interest] org.jdom.Namespace not implementing
> Serializable?
>
>
>
>
> > 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.
>
>
>
> --Jools
>
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhos
> t.com
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com
More information about the jdom-interest
mailing list