Assaf Arkin wrote: > > I't not a design bug, it's a feature ;-) > Seriously, a serializer only needs to implement Serializer or > DocumentHandler. The default factory only deals with three specific > serializers, all of which extend BaseSerializer.
Look at the init() method. If my class implements Serializer but not BaseSerializer look what happens. MethodNotFoundException is a bug, not a feature ;-) > There should definitely be a way to use this factory with other > serializers. But you need to define a way to register and locate them > first. Somthing along: > > void registerSerializerFactory( String method, SerializerFactory > factory ); > > or from a property file: > > org.apache.xml.serialize.xml=<factory-class> > > +1 for the rest of the interfaces you proposed. I like the method more. It's much more portable, expecially since some applications may have their own configuration repositories and sometimes don't even use Properties. Stefano.
