3 Replies Latest reply on Aug 17, 2012 7:08 AM by kowshik NS

    infinispan as slc in 7.1.1.Final:  Mgmt console showing no put/hit/miss

    Marc Rosenthal Newbie

      I am using 7.1.1.Final with JPA and I would like to verify that Infinispan is working.  My persistence.xml (relevant section):



      <property name="hibernate.transaction.manager_lookup_class"



      <property name="hibernate.cache.use_second_level_cache" value="true" />

      <property name="hibernate.cache.use_query_cache" value="true" />

      <property name="hibernate.cache.use_minimal_puts" value="true"/>

      <property name="hibernate.cache.infinispan.statistics" value="true"/>



      When jboss is starting I see the the timestamps cache and the query cache start, but no mention of the entity cache.  server.log:


      11:18:55,257 INFO  [org.hibernate.cache.spi.UpdateTimestampsCache] (MSC service thread 1-3) HHH000250: Starting update timestamps cache at region: at.ear/atbusiness.jar#atPersistence.org.hibernate.cache.spi.UpdateTimestampsCache

      11:18:55,260 INFO  [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-3) ISPN000128: Infinispan version: Infinispan 'Brahma' 5.1.2.FINAL

      11:18:55,420 INFO  [org.infinispan.jmx.CacheJmxRegistration] (MSC service thread 1-3) ISPN000031: MBeans were successfully registered to the platform mbean server.

      11:18:55,424 INFO  [org.jboss.as.clustering.infinispan] (MSC service thread 1-3) JBAS010281: Started at.ear/atbusiness.jar#atPersistence.org.hibernate.cache.spi.UpdateTimestampsCache cache from hibernate container

      11:18:55,476 INFO  [org.hibernate.cache.internal.StandardQueryCache] (MSC service thread 1-3) HHH000248: Starting query cache at region: at.ear/atbusiness.jar#atPersistence.org.hibernate.cache.internal.StandardQueryCache

      11:18:55,490 INFO  [org.infinispan.jmx.CacheJmxRegistration] (MSC service thread 1-3) ISPN000031: MBeans were successfully registered to the platform mbean server.

      11:18:55,491 INFO  [org.jboss.as.clustering.infinispan] (MSC service thread 1-3) JBAS010281: Started at.ear/atbusiness.jar#atPersistence.org.hibernate.cache.internal.StandardQueryCache cache from hibernate container



      My standalone.xml has default settings for infinispan:


              <subsystem xmlns="urn:jboss:domain:infinispan:1.2" default-cache-container="hibernate">

                  <cache-container name="hibernate" default-cache="local-query">

                      <local-cache name="entity">

                          <transaction mode="NON_XA"/>

                          <eviction strategy="LRU" max-entries="10000"/>

                          <expiration max-idle="100000"/>


                      <local-cache name="local-query">

                          <transaction mode="NONE"/>

                          <eviction strategy="LRU" max-entries="10000"/>

                          <expiration max-idle="100000"/>


                      <local-cache name="timestamps">

                          <transaction mode="NONE"/>

                          <eviction strategy="NONE"/>






      My issue is that when I check the statistics in the management console, it doesn't appear that anything is being stored in the cache.  When I go to Subsystem Metrics -> JPA, click on the 'view' link next to my persistence unit (atPersistence), I see session open and closes, transactions (completed/successful), query execution count and exec max time, but the Query Cache and Second Level Cache sections show 0 for put/hit/miss.


      Am I missing something in my configuration.


      Thanks so much.