Lost reference to object after deserialization
<p>Suppose I have two <code>HashMap</code>s: <code>hashMapFoo</code> and <code>hashMapBar</code>. </p>

<p>I create some object <code>objCake</code> and <code>put</code> it into both maps, so each map has a reference to <code>objCake</code>, and when I make some changes to <code>objCake</code> whichever map I access it from, I get correct state of my object.</p>

<p>After I serialize both maps and deserialize them, I meet problem that my object <code>objCake</code> has become two different objects! I change its state in <code>hashMapFoo</code>, but nothing happens in <code>hashMapBar</code>. <code>hashMapBar</code> does not contain the correct reference any more!
All maps and objects <code>implement Serializable</code>.</p>

<p>Can anyone please explain?</p>
