On 15 Aug 2013, at 14:48, Galder Zamarreño <galder(a)redhat.com> wrote:
> I actually did not enjoy writing parsers and config builders
etc…
^ Why not? Too verbose? Too many classes?
I'd rather improve this than carry on supporting property-based configuration (any
other type safety advocates?)
Type safety can be enforced by requiring java-bean like properties on the configuration
object.
E.g.
<property name="timeout" value="123wrong43"/>
<property name="conction" value="blah"/> <--name of the
property misspelled -->
Both would fail to be set on the object:
XyzStoreConfig {
void setTimeout(long timeout);
void setConnection(String connection);
}
This wouldn't require writing a parser and would provide type safety. Wdyt?
Cheers,
--
Mircea Markus
Infinispan lead (
www.infinispan.org)