Ciao, did you actually have a look at
http://www.castor.org/xml-tips-tricks.html at all ? Werner VitoAndolini wrote: > > Hello, I have a question regarding the best practice for instantiating > castor's Mapping and Unmarshaller classes. > > My initial thought is that if the Mapping instance is always loaded with the > same xml file, and the Unmarshaller instance is always sets the same > instance of Mapping, we should try to minimize the creation of these > objects. > > If this is true, the anti-practice woiuld be to instantiate new Mapping and > Unmarshaller objects with every request. The best practice would be to make > these objects static, so that they are only created once for every class > that uses them. > > Is this correct? I notice that the Mapping class has a synchronized method > "getResolver" - could this hurt performance if Mapping is static? Are there > any other issues to consider when instantiating the Mapping and > (Un)Marshaller classes? > > Many Thanks... --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

