[infinispan-dev] Clustering mode attribute

Vladimir Blagojevic vblagoje at redhat.com
Wed Jul 15 10:55:41 EDT 2009


On 7/15/09 4:28 PM, Manik Surtani wrote:
>
> On 15 Jul 2009, at 11:36, Vladimir Blagojevic wrote:
>
>> Hey dudes,
>>
>> Ambiguity that we allow in attribute mode of <clustering> element is 
>> not good IMHO. Normally, we use allowedValues attribute of 
>> ConfigurationElement annotation to capture that the type even though 
>> is a String or int or whatever only allows only certain set of 
>> values. We constrain properly locking, shutdownHook and what not. 
>> However, for mode attribute in <clustering> we allow all possible 
>> combination of substrings, upper caps, lower caps and what not.
>>
>> I was wondering if we can constrain the allowed values to LOCAL, 
>> INVALIDATION, REPL, and DIST.
>
> What about a regexp?  This is how I constrain it in the hand-written XSD.
Hmmm, can work, but you calculate the trade off. If they are given as 
comma delimited list, documentation is much more readable and I think 
XML editor gives you drop down list for these options when editing XML 
configuration file.

Let me know.



More information about the infinispan-dev mailing list