[jdom-interest] org.jdom.Namespace not implementing Serializable?

Humphrey Sheil Humphrey.Sheil at Kadius.com
Thu Jul 20 10:38:10 PDT 2000


I'm using JDOM with an EJB application server.  Basically, instead of
passing around StringBuffers, Strings, char or byte arrays, I'd like to
construct an org.jdom.Document straight from reading data from the database
and pass it back to my session bean manager.

Now the EJB spec. requires that all arguments passed between EJBs be
serializable (eventually EJB 2.0 will require RMI-IIOP as the communication
protocol both inter and intra application server).  The Document class is,
as well as the other classes it references (I've checked the sourcecode)
implementing java.io.Serializable.  But when my app. server (weblogic 5.1)
tries to marshal the Document in advance of sending it down the wire,
somehow it picks up the Namespace class and throws an exception since it
isn't serializable.

The question I have is:

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.

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)?

Setup:

I'm using the beta 4 snapshot of JDOM
JDK - 1.2.2, no hotspot
Windows 2000
Application server:  Weblogic 5.1

Regards

Humphrey



More information about the jdom-interest mailing list