Jboss 7.1.1中使用Infinispan和Hibernate的二级缓存配置
我正在使用JBoss7.1.1和Hibernate。我想在单个节点上配置二级缓存Jboss 7.1.1中使用Infinispan和Hibernate的二级缓存配置,hibernate,jboss7.x,infinispan,Hibernate,Jboss7.x,Infinispan,我正在使用JBoss7.1.1和Hibernate。我想在单个节点上配置二级缓存 standalone.xml 由org.hibernate.cache.NoCachingEnabledException引起的。未启用二级缓存以供使用[hibernate.cache.use_Second_level_cache | hibernate.cache.use_query_cache] 任何帮助都将不胜感激 请检查您收到的异常情况 (org.hibernate.cache.NoCachingEnabl
standalone.xml
由org.hibernate.cache.NoCachingEnabledException引起的。未启用二级缓存以供使用[hibernate.cache.use_Second_level_cache | hibernate.cache.use_query_cache]
任何帮助都将不胜感激 请检查您收到的异常情况
(org.hibernate.cache.NoCachingEnabledException)
<caches>
<cache name="simple" aliases="NoPassivationCache"/>
<cache name="passivating" passivation-store-ref="file" aliases="SimpleStatefulCache"/>
</caches>
<passivation-stores>
<file-passivation-store name="file"/>
</passivation-stores>
<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>
<local-cache name="local-query">
<transaction mode="NONE"/>
<eviction strategy="LRU" max-entries="10000"/>
<expiration max-idle="100000"/>
<local-cache>
<local-cache name="timestamps">
<transaction mode="NONE"/>
<eviction strategy="NONE"/>
</local-cache>
</cache-container>
</subsystem>
<prop key="hibernate.cache.use_second_level_cache">true</prop>
<prop key="hibernate.cache.use_query_cache">true</prop>
<prop key="hibernate.cache.region.factory_class">org.hibernate.cache.infinispan.JndiInfinispanRegionFactory</prop>
<prop key="hibernate.cache.infinispan.cachemanager">java:CacheManager/entity</prop>
17:20:16,949 INFO [org.hibernate.impl.SessionFactoryObjectFactory] (MSC service thread 1-2) Not binding factory to JNDI, no JNDI name configured
17:20:16,951 INFO [org.hibernate.cache.UpdateTimestampsCache] (MSC service thread 1-2) starting update timestamps cache at region: org.hibernate.cache.UpdateTimestampsCache
17:20:16,952 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] (MSC service thread 1-2) Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@8deb1e: defining beans [mvcContentNegotiationManager,org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#0,org.springframework.format.support.FormattingConversionServiceFactoryBean#0,org.springframework.validation.beanvalidation.LocalValidatorFactoryBean#0,org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter#0,org.springframework.web.servlet.handler.MappedInterceptor#0
...