> Look at the init() method. If my class implements Serializer but not > BaseSerializer look what happens. > > MethodNotFoundException is a bug, not a feature ;-)
This is because I've hard-coded the implementation to use Init and BaseSerializer. As I said, this hardcoding only works as long as your pool of serializers is limited to these specific implementations. Once you extend that pool you need a different Serializer with factories, dynamic resolving and of course, no dependency on BaseSerializer implementation. BTW previously you had to call init() to get something working, at Keith's advise I later changed that to the constructor, so the init() call should go away anyhow. (Will be in the next commit) arkin > > > 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.
