Hey guys,
I completed module configuration proposal Manik and I agreed upon. It is
very important to get this one right so I want to run it by you before
proceeding further!
Have a look at [1] and follow proposed module configuration example below:
<infinispan
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="urn:infinispan:config:4.0">
<global>
<transport clusterName="demoCluster"/>
</global>
<default>
<clustering mode="replication">
</clustering>
<modules>
<module name="query"
configClassName="org.infinispan.query.config.QueryConfigurationBean">
<indexing enabled="true" indexLocalOnly="true"/>
</module>
</modules>
</default>
</infinispan>
A few things to notice:
a) Any configuration (including default and namedCache) can have a
module definition
b) Instance of configClassName is a rich object structure filled from
module's child XML content
c) Module's XML content can be arbitrary
d) Custom module configuration bean is accessed by module name:
Configuration def = c.parseDefaultConfiguration();
ModuleConfigurationBean extensionConfig =
def.getModuleConfigurationBean("query");
QueryConfigurationBean bean = (QueryConfigurationBean)
extensionConfig.getConfigurationBean();
assert bean.isEnabled();
assert bean.isIndexLocalOnly();
The proposal achieves full flexibility when it comes to having rich
object configuration structure that modules define themselves.
Furthermore, core module is completely isolated from module
configuration extensions. Schema easily accommodates this model and
there is no adverse effect on performance!
[1]
https://jira.jboss.org/jira/browse/ISPN-193