ObjectOutputStream:reset() does not clear old references
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Mohan_Krishnamurthy
Posted On:   Friday, November 9, 2001 11:48 AM

Hi I am writing a client-server application which exchange serialized objects over the socket connection. I ran into the same problem where ObjectInputStream:readObject did not get the latest object sent by the corresponding ObjectOutputStream. Calling reset() before sending the modified object did not solve my problem. I dont get any exceptions also. I am using JDK 1.3. Any clues/ideas how to get around this problem ? Thanks in advance! Mohan    More>>

Hi
I am writing a client-server application which exchange serialized objects over the socket connection.

I ran into the same problem where


ObjectInputStream:readObject did not


get the latest object sent by the


corresponding ObjectOutputStream.


Calling reset() before sending the


modified object did not solve my


problem. I dont get any exceptions also.


I am using JDK 1.3.


Any clues/ideas how to get around this problem ?

Thanks in advance!
Mohan

   <<Less

Re: ObjectOutputStream:reset() does not clear old references

Posted By:   sriram_chatty  
Posted On:   Wednesday, January 2, 2002 12:21 PM

Or reset the ObjectOutputStream to clear all the previous object graphs before writeObject()

Re: ObjectOutputStream:reset() does not clear old references

Posted By:   sriram_chatty  
Posted On:   Wednesday, January 2, 2002 07:34 AM

make sure you always right a new object each time you do writeObject from both client and server. This should solve your problem
About | Sitemap | Contact