William P O'Sullivan wrote:You need to tell us which version of JBoss you are using!!
The more information you provide, the more help you will get.
WP
Winston Gutkowski wrote:
Vineet Yekurde wrote:As per above , what i serialized is i=5,d=5.5. Buf after deserialization what i get is : i=1,d=1.1
is this fine ? No ....
Actually: Yes.
First off, the idea of a mutable Singleton seems bizarre; but even given that, presumably the whole point of having a singleton is that there's only one of them, and it should always reflect the latest state. You appear to want your de-serializer to act as a "resetter", which strikes me as:
(a) Dangerous.
(b) If you absolutely must have it work that way, you've written your readResolve() method wrong: What it needs to do is get the instance and update it before returning it.
Winston
Seetharaman Venkatasamy wrote:readResolve wont create new Instance it return existing Instance . if you are not implement readResolve then deserialize create new Instance that is why readResolve needed