Here's the thing. Machine 1 might store 10, but then if you call Machine 2, it might store 0. What you need to do is more like:
| Integer count = (Integer)cache.get("/a/b/c", "Key1"); | if (count == null) // initialize | count = 0; | count = count + 1; | cache.put("/a/b/c", "Key1", count); | But there's a potential race condition here. Use pessimistic locking and transactions to ensure this is atomic. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4132286#4132286 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4132286 _______________________________________________ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user