[infinispan-dev] Re: property tags in configuration files
Vladimir Blagojevic
vblagoje at redhat.com
Mon Jun 22 13:41:15 EDT 2009
On 6/22/09 10:52 AM, Emmanuel Bernard wrote:
> OK here is my take.
>
> Populating bean is fairly PITA for a user and a fluent API approach
> makes configuration more readable.
Fluent config API is the one that allows chaining calls, right? These
are very elegant, but they seem more suitable for configs that follow
more of a grammar like structure. Infinispan's config tree is not so
nice so to speak.
>
> http://anonsvn.jboss.org/repos/hibernate/search/trunk/src/test/java/org/hibernate/search/test/configuration/ProgrammaticMappingTest.java
>
> (check NotUseddefineMapping)
> and the root class
> http://anonsvn.jboss.org/repos/hibernate/search/trunk/src/main/java/org/hibernate/search/cfg/SearchMapping.java
>
>
> if you want to stay on the bean side, I am wondering why you don't use
> JAXB or something like that to bind the XML model to the object model.
We want to reuse these annotations to kill three birds with one stone.
Configuration beans are the source, or if you want - code is the source.
We annotate those beans and get for free human readable configuration
documentation, configuration schema, and, if possible, use those
annotations in conjunction with beans to populate the beans
automatically during configuration reading from xml.
Does it make better sense now? Appreciate your input!
Regards,
Vladimir
More information about the infinispan-dev
mailing list