This content has been marked as final.
Show 3 replies
-
1. Re: Can't replicate the change in a Hashtable Object
ben.wang Nov 10, 2004 5:21 PM (in response to tinachen)Tine,
I take it that you are referring to TreeCacheAop part. Collection classes are handled by proxy implicitly. So you will need to operate on the proxy, e.g.,
aHashTable = (HashTable)getObject(aFqn);
aHashTable.put("1", "test");
etc.
-Ben -
2. Re: Can't replicate the change in a Hashtable Object
belaban Nov 11, 2004 4:52 AM (in response to tinachen)"tinachen" wrote:
Hi, All:
I create a standardalone JBossCache three node cluster, then insert one Hashtable in one node using the method "putObject(aFqn, aHashtable)".
But I found if I change the content of the aHashtable Object in one node, the change didn't replicate in other node. Could anybody tell me how I can make it work?
Thank you very much.
Tina
On a general note: putting a hashmap as value of an FQN might be replaced by taking the contents of the mashmap and creating a new subtree in JBossCache, e.g.Map m; TreeCache c; Fqn base=Fqn.fromString("/a/b/c"); for(Iterator it=m.entries().iterator(); it.hasNext();) { Map.Entry entry=(Map.Entry)it.next(); c.put(fqn, entry.getKey(), entry.getValue()); }
Bela -
3. Re: Can't replicate the change in a Hashtable Object
tinachen Nov 11, 2004 10:25 AM (in response to tinachen)Hi, Ben:
I found the reason for the Hashtable replication. Actually, the function works fine, but the replication latency is huge, much more than the SyncReplTimeout 10000 ms. That's why the thread on other nodes can't pickup the new value.
Thank you very much.
Tina