1 Reply Latest reply on Feb 23, 2015 5:08 AM by Tristan Tarrant

    JDG statistics, configuration and tomcat questions

    Mehdi Rakhshani Newbie


      I am starting to look at JDG for caching within our app. Have a few questions that hopefully more experienced folks can answer.




      • Is there a way to reset the statistics programmatically? This would be used when running performance tests. Otherwise, would have to clear the cache or restart the app. I know it can be reset via jconsole.
      • I think the answer to this is no but I will ask anyway. Requests come in from different applications on different hosts for some cached data. Since JDG already keeps cache statistics, is there any way to customize statistics by adding some sort of tag so that stats can be kept per tag (e.g. how many hits from a particular host)?
      • When using a configuration file, how can configuration be logged? When configuring programmatically, the toString() on GlobalConfiguration and Configuration are pretty thorough, but if the configuration is read from a file is there a way to get to the values? Need to retrieve max entries.
      • The Infinispan Data Grid Platform book says cache configurations are immutable and cannot be changed. It seems having the ability to change certain configuration parameters at runtime (e.g. max entries) would be desirable. Any thoughts on that?
      • All the distributed examples seem to be for JBoss Enterprise Application. Are there any for Tomcat? Any gotcha’s for using Tomcat?



      Message was edited by: Mehdi Rakhshani

        • 1. Re: JDG statistics, configuration and tomcat questions
          Tristan Tarrant Master

          For resetting stats programmatically, try this:




          Tagged stats: no we don't have anything of the sort.


          Logging declarative configuration:




          Runtime configuration modification: yes we are working on that. The statement from the book is not entirely correct as some options are indeed modifiable at runtime (e.g timeouts):


          cacheManager.getConfiguration("myCache").clustering().stateTransfer().timeout(TimeUnit(100, TimeUnit.SECONDS));


          We test against Tomcat, so there should be no issues.