On Tuesday 15 April 2008, Benson Margulies wrote: > Aegis doesn't know from DAO and Domain objects. It just knows that you > want to map a class to XML. It requires a way to both retrieve and set > a field. Dan, is JAXB more permissive here? If so, I guess we could > change Aegis to permit Java->XML and throw on XML->Java.
Well, JAXB CAN be more permissive as you can tell jaxb to completely ignore the getter/setters and access the fields directly. That's actually the default if you annotate the field with the @XmlElement annotation instead of the getter. Since most people annotate the field instead of the methods, it will normally access the field directly. However, if you DON'T put @XmlElement annotations on things, then the default behavior for JAXB would be exactly the same. It wouldn't find a public property named "version" as there wouldn't be a setter available. -- J. Daniel Kulp Principal Engineer, IONA [EMAIL PROTECTED] http://www.dankulp.com/blog