[infinispan-dev] How to add programmatic config to an exisitng xml configured cache
Faseela K
faseela.k at ericsson.com
Thu Feb 20 04:11:29 EST 2014
Hi,
I have some infinispan configurations available in "config.xml".
After loading this configuration, I want to append some more configurations programmatically, using Configuration Builder.
I am doing something like this :
Configuration template = null;
ConfigurationBuilder builder = new ConfigurationBuilder();
DefaultCacheManager manager = new DefaultCacheManager(
"config.xml");
template = manager.getCacheConfiguration("evictionCache");
builder.read(template);
builder.loaders().passivation(false).shared(false).preload(true)
.addFileCacheStore().fetchPersistentState(true)
.purgerThreads(3).purgeSynchronously(true)
.ignoreModifications(false).purgeOnStartup(false)
.location("tmp").async()
.enabled(true).flushLockTimeout(15000).threadPoolSize(5)
.singletonStore().enabled(true).pushStateWhenCoordinator(true)
.pushStateTimeout(20000);
manager.defineConfiguration("abcd", builder.build());
The problem with this code is, it's overwriting the evictionCache configuration.
Can somebody help me to fix this issue?
Thanks,
Faseela
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/infinispan-dev/attachments/20140220/31a82d43/attachment.html
More information about the infinispan-dev
mailing list