-
1. Re: How find CacheContainer by name?
wdfink May 9, 2015 12:17 PM (in response to emelyanov)That is one reason for Infinispan cache
You need to have the same configuration in both applications. With the jgroups configuration you build a cluster and then you need to use a clustered cache in replication or distribution mode.
For more information you should read the Getting started Guide
Also the quickstarts are useful http://infinispan.org/quickstarts/
-
2. Re: How find CacheContainer by name?
emelyanov May 12, 2015 4:44 AM (in response to wdfink)My code
private static EmbeddedCacheManager container;
public Cache getCache() {
if (container == null) {
container = new DefaultCacheManager(new ConfigurationBuilder()
.clustering()
.build());
}
return container.getCache();
}
In the first application, everything works fine.
In the second application, I get an error:
org.infinispan.jmx.JmxDomainConflictException: Domain already registered org.infinispan when trying to register: type=CacheManager,name="DefaultCacheManager"
-
3. Re: How find CacheContainer by name?
wdfink May 18, 2015 3:52 PM (in response to emelyanov)You need to allow it,
with new GlobalConfigurationBuilder()......allowDuplicateDomains(true)....
-
4. Re: How find CacheContainer by name?
emelyanov Jun 1, 2015 6:47 AM (in response to wdfink)new GlobalConfigurationBuilder()......allowDuplicateDomains(true)....
So I got 2 different cache. But I need 1 (common).
>>> "and want to access it in another application."