-
1. Re: Injecting JGroups configuration
manik Jan 14, 2010 9:55 AM (in response to noelo)noelo wrote:
Hi,
I'm currently trying to build a demo on EC2 which requires the address [ip:port] of a jgroups gossip router. This address is dynamic each time the gossip router node is restarted. Currently to inject the address I do a search/replace on a tag in the jgroups config and then pass that config onto infinispan via the GlobalConfiguration.setTransportProperties method.
You could pass it in to the VM as a system property (-Dmy.gossip.router=1.2.3.4:1234) and then refer to this in your config file (<.... router="${my.gossip.router}" .... >). These are substituted when parsing the XML so you don't need to bother with search/replace yourself.
noelo wrote:
Also I was wondering if there is a way to partition the configuration e.g. have a global configuration file and then a cache configuration file.
I see that the one of the constructors of the DefaultCacheManager takes a global configuration and a default configuration object as parameters but I can't see a way of parsing and creating these GlobalConfiguration and Configuration objects from XML files.
There is no way today, but it is a reasonable request. Feel like creating a JIRA, contributing it? Should be pretty straightforward.
Cheers
Manik
-