This is the mail archive of the rhug-rhats@sources.redhat.com mailing list for the RHUG project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

transmission of serialized objects over a POST http request with rhug - patch solution


I have 2 servlets communicating via a POST http request and trnasmitting a 
serialized object.
It used to work fine with jdk and tomcat3.2.3.
I am on the road to gcj and rhug.
I found problems with the serialisation so that I build a small example with 
two servlets which exchange a simple serialized object. This object contains 
a Vector.
I had to change the code in gnu.gcj.protocol.http.Connection in order to have 
a correct POST http request.
I send a gnats bug report with my solution to gcc but after one week, the bug 
is still unasigned.
So I decided to give my correction to rhug users, allowing to patch gcj.
The Connection class is given in the tar joined to this mail.
After that, I found in rhug how to deserialise an object with the rhug class 
loader, so that the MielMail object can be found by the receiving servlet 
(M1.java). So I wrote a small class (MielObjectInputStream.java) for 
deserialization class loading.
After that, there was a problem with deserialization of null objects in the 
Vector of MielMail. I had to correct java.lang.ObjectInputStream.java because 
there was a NullPointerException in a dump instruction.
In the joined tar file, I give all source files for these correction plus 
exmaples classes.
I hope it can be usefull to rhug users and I also hope rhug gourous can point 
out gcc developpers in order these bugs will be soon corrected in the gcc 
release.
Yours sincerely,
Christophe Roux

Attachment: postobje.tgz
Description: GNU Zip compressed data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]