Im seeing what i can only explain as strange behaviour using the ClusteredcacheLoader. Ok IÂ´ll try and explain what im seeing. I have tried my code both with and without the ClusteredCacheLoader, everything works as expected when i dont have the cacheloader configured which leads me to believe it is something to do with my cache loader.
I have 2 nodes both running on tomcat (One actually runs on tomcat 5 and other tomcat 6 (dont ask))
As i said, without ClusteredcacheLoader, everything works fine.
Ok, IÂ´ll try and explain, Node 1 and Node 2 are empty. Node 1 receives a request for data item X. Request for data Item X triggers 2 calls and 2 entries to be put into the cache. The path for data item 1 looks like so
Entry into the cache for data item 2 looks like so
*(2) This is the no of elements in the hashmap of the node. 1 is the custom object that i want to store and the other the expiration element needed for the expiration policy.
Im using the expiration eviction policy, the timeout for the first daa item is 15 mins and the 2nd is a week.
Now heres what happens.
I make the first request for data item X, its not there so i put 2 entries into the cache. What i expect to see is this
I look at my custom made mbean to view the cache tree and i see entries like so
I make a 2nd request, still within time frame and i see the following
I now have an entry in the cache for the first data element but still not the 2nd.
I make a third request and i see
I get a hit for the first data element but still not the 2nd.
And finally i make the 4th request and afterwards i see
So finally after 4 requests the same data item gets put into the cache. It looks like with every time i make a request it stores the extra path element. i.e
1st request /b
Any ideas as to whats going on, the nodes have the same config, i havent changed "ClusterConfig" for the 2 nodes, should i?? Maybe port changes??(I need to read up on the jgroups side of things).
On another note, is there anything like jmx-console that runs in tomcat?? So i can use the jmx-beans that come out of the box with jboss-core, i mean more in relation to the tree structure, JConsole doesnt give me the nice tree structure that i would get when using jmx-console.
Like i said earlier, it works as i expect without the CacheLoader configured. IÃ‚Â´m running the cache in REPL_ASYNC with a bit of hack like so
for every item added to the cache to stop them from been replicated to other nodes. Also its the 2.1 version im using.