[infinispan-issues] [JBoss JIRA] (ISPN-4919) Configuration templates
Paul Ferraro (JIRA)
issues at jboss.org
Tue Dec 2 08:40:39 EST 2014
[ https://issues.jboss.org/browse/ISPN-4919?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13024408#comment-13024408 ]
Paul Ferraro commented on ISPN-4919:
------------------------------------
Does this suggest that cache xml attributes will no longer have default values?
Let's say I define a template cache that defines <transaction isolation="REPEATABLE_READ"/> and a cache extension that defines <transaction mode="BATCH"/>. What then is the transaction isolation of the configured cache? The xsd says that transaction isolation defaults to READ_COMMITTED, meaning that <transaction isolation="READ_COMMITTED"/> and <transaction/> should be equivalent xml. However, I think this jira means to imply that the cache will use the "inherited" REPEATABLE_READ isolation. Thus, for the xsd to be correct, it will have to use 2 sets of attribute groups for each cache child resource, one that uses explicit default values (for cache templates) and one without defaults (meaning, the default value is implied by the configured template). That seems confusing to me.
Consider too the child resources of a cache. A given resource (e.g. transaction), is fully defined, how would you determine which attributes meant to be "overrides" of the template and which are not, in particular when the template uses a non-default value, and the cache wants to override the value to match the original default?
> Configuration templates
> -----------------------
>
> Key: ISPN-4919
> URL: https://issues.jboss.org/browse/ISPN-4919
> Project: Infinispan
> Issue Type: Feature Request
> Components: Configuration
> Reporter: Tristan Tarrant
> Assignee: Tristan Tarrant
> Fix For: 7.1.0.Beta1
>
>
> Currently there is a 1:1 relationship between configuration and named caches. While the programmatic API does have the ability to .read() an existing configuration to create a new one, the declarative config does not.
> We should introduce the concept of configuration inheritance, e.g.:
> {code}
> <local-cache name="eviction-cache">
> <eviction strategy="LIRS" maxEntries="10000"/>
> </local-cache>
> <local-cache name="mycache" template="eviction-cache" />
> {code}
> Possibly, cache templates should be made "abstract" so that they cannot be instantiated as named caches directly, e.g.:
> {code}
> <local-cache name="eviction-cache" abstract="true">
> ...
> </local-cache>
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.8#6338)
More information about the infinispan-issues
mailing list