Both tx run on the same cache isntance.
Here is more datailed call flow
1-2) each tx has its own localCacheCopy
Set keys=treeCache.getKeys(nodeName)
Iterator it=keys.iterator()
Map localCacheCopy=....;
while(it.hastNext()
{
Object key=it.next();
Object val=treeCache.getObject("OURCACHE",key)
localCacheCopy.put(key,val)l
}
//Store localCacheCopy in tx local data.
3-4)
getLocalCacheCopy().put("ALA","ALA");
getLocalCacheCopy().put("BEATA","BEATA"); - retrieves localCacheCopy for Tx[1]
5)
getLocalCacheCopy().remove("OLA"); - retrieves localCacheCopy for Tx[2]
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995585#3995585
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3995585
I can't find this in an example. But it is really easy. Add jgroups.jar jboss-cache.jar (see the seam lib dir), add a treecache.xml (example in the remoting/chatroom example) to your ear, (make sure they are on the ear classpath, e.g. put them in application.xml), add a <s:cache key="myKey"> tag to the page surrounding the portion of the view to cache, watch it cache. You can tune it from treecache.xml.
This is all the integration seam has with cache afaik, but you can use the pojocache component in your beans
e.g.
PojoCache.instance().put(region, key, content);
| PojoCache.instance().get(region, key);
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995566#3995566
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3995566