Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
jcs-1.3
-
JDK1.6
ALL Operating Systems
Description
In a Lateral cache environment, If a mutable object is written to JCS multiple times, only original copy is written every time by ObjectOutputStream of LateralTCPSender.
This seems to be a known issue as per some forums, but not fixed since it could not be replicated.
My case is as follows: Server A & B has a common mutable object (say StringBuffer) in cache.
JDK1.6 Server A:
StringBuffer obj=new StringBuffer("Initial");
jcs.put("key",obj);//This is visible to Server B
obj.append("Append");
jcs.put("key",obj);//This gets ignored, B still sees obj="Initial"
I recompiled with LateralTCPSender.RESET_FREQUENCY from 70 to 1, it works fine.
I suggest, either RESET_FREQUENCY should be 1 or use oos.writeUnshared.