You should set the invocation batching in the Configuration *before* getting the cache from the CacheManager. Basically this line only reads the value for invocation batching, instead of writing it:
ConfigurationBuilder c = new ConfigurationBuilder();
Cache cache = new DefaultCacheManager(c.build()).getCache();
Just notice this is on the JBossCache forum, it really should be on the infinispan forum.
Thanks a lot for your answer it helped me...I have changed my search to infinispan. I want to know how can we use treecache infinispan with servlets. if any one can help me with any documents or links.