This content has been marked as final.
Show 1 reply
-
1. Re: Is it possible to configure the grouping for Infinispan from the standalone.xml file?
pferraro Jun 14, 2012 2:27 PM (in response to pillingworth)Not via xml (https://issues.jboss.org/browse/AS7-3268), but you could do this programmatically.
{code}
@Resource(lookup = "java:jboss/infinispan/container/mycontainer")
private EmbeddedCacheManager manager;
private Cache<?, ?> cache;
@PostConstruct
public void init() {
ConfigurationBuilder builder = new ConfigurationBuilder().read(manager.getCacheConfiguration("some-cache"));
builder.clustering().hash().groups().enabled();
manager.defineConfiguration("new-cache", builder.build());
this.cache = manager.getCache("new-cache");
}
{code}