Lateral Cache does not work with multiple writes to same object: OOS does not
get reset
---------------------------------------------------------------------------------------
Key: JCS-82
URL: https://issues.apache.org/jira/browse/JCS-82
Project: JCS
Issue Type: Bug
Components: TCP Lateral Cache
Affects Versions: jcs-1.3
Environment: JDK1.6
ALL Operating Systems
Reporter: Nikunj Trivedi
Assignee: Aaron Smuts
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.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]