public inbox for rhug-rhats@sourceware.org
 help / color / mirror / Atom feed
* transmission of serialized objects over a POST http request with rhug - patch solution
@ 2002-09-07 10:01 Christophe Roux
  2002-09-07 12:14 ` Anthony Green
  0 siblings, 1 reply; 2+ messages in thread
From: Christophe Roux @ 2002-09-07 10:01 UTC (permalink / raw)
  To: rhug-rhats

[-- Attachment #1: Type: text/plain, Size: 1438 bytes --]

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 #2: postobje.tgz --]
[-- Type: application/x-gzip, Size: 13817 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: transmission of serialized objects over a POST http request with rhug - patch solution
  2002-09-07 10:01 transmission of serialized objects over a POST http request with rhug - patch solution Christophe Roux
@ 2002-09-07 12:14 ` Anthony Green
  0 siblings, 0 replies; 2+ messages in thread
From: Anthony Green @ 2002-09-07 12:14 UTC (permalink / raw)
  To: Christophe Roux; +Cc: rhug-rhats

Thanks for all the debugging work!

I can help get these changes into the GCC sources.

For ObjectInputStream, what was the rationale for removing the
Field.setAccessible calls?

In Connection, why do you call sock.setReceiveBufferSize(4096)?

Thanks,

AG




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-09-07 19:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-07 10:01 transmission of serialized objects over a POST http request with rhug - patch solution Christophe Roux
2002-09-07 12:14 ` Anthony Green

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).