dcsimg
How do readResolve and writeReplace work with RMI-IIOP
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Andy_Bethell
Posted On:   Monday, June 11, 2001 06:16 AM

We have produced a class to represent a type-safe enumeration of values. The class uses the writeReplace/readResolve methods of Serialization to ensure only one instance of each value in each VM. This works fine with most object output/input streams such as File, RMI etc., but we have a problem with the ObjectOutputStream used in RMI-IIOP. It appears that the writeReplace and readResolve methods are never called in this case. I have discovered an issue in the OMG discussion group/email, but I can't find any resolution of the issue. Can anyone let me know how to ensure that the readResolve/writeReplace methods are properly called when using RMI-IIOP?    More>>

We have produced a class to represent a type-safe enumeration of values. The class uses the writeReplace/readResolve methods of Serialization to ensure only one instance of each value in each VM. This works fine with most object output/input streams such as File, RMI etc., but we have a problem with the ObjectOutputStream used in RMI-IIOP. It appears that the writeReplace and readResolve methods are never called in this case.

I have discovered an issue in the OMG discussion group/email, but I can't find any resolution of the issue.

Can anyone let me know how to ensure that the readResolve/writeReplace methods are properly called when using RMI-IIOP?

   <<Less
About | Sitemap | Contact