Hello, I'm currently working on a patch to *) introduce XMLContext, as new centerpiece of Castor features and also single point to start working with Castor *) introduce XMLConfiguration, a new Configuration implementation which is back at the one and only purpose - providing configuration values set in a properties file *) to remove LocalConfiguration and as the new configuration implementation is available and this class already included a couple of features which had nothing to do with configuration *) to remove 'staticness'
The problem is that I can do this only when (more or less) breaking the existing Castor interface. In today's Castor implementation is is possible to: // implement something // set any property to any value into the static configuration Configuration config = LocalConfiguration.getInstance(); config.getProperties().setProperty("...", "..."); // again do something different // create and use a marshaller or unmarshaller and it will use the property set above Marshaller marshaller = new Marshaller(out); marshaller.marshal(aClass); and this sequence of statements doesn't have to be anyhow 'close' in meaning of: *) whithin same method *) within same class To be honest - I want to break with this possibility!!! I want to remove all static stuff for sake of *) multithreaded applications *) clearer path of influence *) less side effects Now my question is: is it ok that I break the interface? The new style would be: XMLContext ctx = new XMLContext(); ctx.setProperty("...", "..."); ctx.addClass(aClass.class); // or omit it if Castor should introspect it later // here would be a great point to split into multiple threads... Marshaller m = ctx.createMarshaller(); m.setWriter(writer); m.marshal(aClass); What are your opinions? Regards Joachim --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email