infinispan作为二级缓存休眠 [英] infinispan as second level cache hibernate
问题描述
lockquote
org.infinispan.jmx.JmxDomainConflictException :ISPN000034:
已经是JMX MBean实例
type = CacheManager,name =DefaultCacheManager已经在
'org.infinispan'JMX域下注册。如果要允许多个实例
使用相同的JMX域配置,请在
的'globalJmxStatistics'配置元素中启用'allowDuplicateDomains'
属性org.infinispan.jmx.JmxUtil.buildJmxDomain(JmxUtil.java: 51)at
org.infinispan.jmx.CacheManagerJmxRegistration.updateDomain(CacheManagerJmxRegistration.java:79)
这里是hibernate属性
setProperty(hibernate.cache.use_second_level_cache,true);
setProperty(hibernate.cache.use_query_cache,true);
setProperty(hibernate.cache.region.factory_class,
org.hibernate.cache.infinispan.InfinispanRegionFactory);
setProperty(hibernate.cache.infinispan.statistics,false);
setProperty(hibernate.cache.infinispan.cfg,infinispan-config.xml);
infinispan配置文件
<?xml version =1.0encoding =UTF-8?>
< infinispan xmlns:xsi =http://www.w3.org/2001/XMLSchema-instance
xmlns =urn:infinispan:config:7.2
xsi:schemaLocation =urn:infinispan:config:7.2
http://www.infinispan.org/schemas/infinispan-config-7.2.xsd
urn:infinispan:config:store:jdbc:7.2
http://www.infinispan.org/schemas/infinispan-cachestore-jpa-config-7.2.xsd\">
< cache-container default-cache =defaultstatistics =false>
< local-cache name =simpleCachestatistics =false>
< / local-cache>
< / cache-container>
< / infinispan>
我有两个包含两个数据源的项目,一个用于审计,另一个是主要的Web项目。
以及处于例外状态的xml值在infinispan版本7.2以后并不存在
在此先感谢您的帮助:)
< jmx duplicate-domains =true/>
添加到< cache-container /> ;
。 错误信息应该更新。
Trying to use infinispan as a second level cache for hibernate but always gives me the following error
org.infinispan.jmx.JmxDomainConflictException: ISPN000034: There's already a JMX MBean instance type=CacheManager,name="DefaultCacheManager" already registered under 'org.infinispan' JMX domain. If you want to allow multiple instances configured with same JMX domain enable 'allowDuplicateDomains' attribute in 'globalJmxStatistics' config element at org.infinispan.jmx.JmxUtil.buildJmxDomain(JmxUtil.java:51) at org.infinispan.jmx.CacheManagerJmxRegistration.updateDomain(CacheManagerJmxRegistration.java:79)
and here is the hibernate properties
setProperty("hibernate.cache.use_second_level_cache", "true");
setProperty("hibernate.cache.use_query_cache", "true");
setProperty("hibernate.cache.region.factory_class",
"org.hibernate.cache.infinispan.InfinispanRegionFactory");
setProperty("hibernate.cache.infinispan.statistics", "false");
setProperty("hibernate.cache.infinispan.cfg", "infinispan-config.xml");
the infinispan config file
<?xml version="1.0" encoding="UTF-8"?>
<infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="urn:infinispan:config:7.2"
xsi:schemaLocation="urn:infinispan:config:7.2
http://www.infinispan.org/schemas/infinispan-config-7.2.xsd
urn:infinispan:config:store:jdbc:7.2
http://www.infinispan.org/schemas/infinispan-cachestore-jpa-config-7.2.xsd">
<cache-container default-cache="default" statistics="false">
<local-cache name="simpleCache" statistics="false">
</local-cache>
</cache-container>
</infinispan>
I have two projects with two datasources , one for audit and the other is the main web project. and the xml value that is in the exception doesn't exist in infinispan version 7.2 onward thanks in advance for any help :)
Add <jmx duplicate-domains="true" />
to <cache-container />
.
The error message should be updated.
这篇关于infinispan作为二级缓存休眠的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!