Dear Tapestry and Spring users,
I'm currently coding a lot of libraries/JARs using Spring stuff. With Tapestry Spring module, I found a very nice feature which is ApplicationContextCustomizer. I used that feature to automatically add a Spring context configuration XML from the classpath of the JARs I was creating. I found that very nice , because it was offering me the possibility to deliver my JAR as a library that can be automatically plugged to an existing webapp without having to do any modifications in my web.xml file (except org.apache.tapestry5.spring.TapestrySpringFilter) . I found this approach very close to the "standard Tapestry way". Additionnaly I was using a Symbol to set the value of my context configuration xml path, which was offering me the possibility to override it by using web.xml or JVM launch argument. The thing is that, currently, if the context-param "contextConfigLocation" is not set, CustomizingContextLoader.determineContextClass() will force a lookup for WEB-INF/applicationContext.xml , and if this file is not present, an exception will be raised So I've got two solutions, and I don't know which one to choose: - Telling end users that my JARs are fully autopluggables, and they've got nothing to do add in their web.xml file (except org.apache.tapestry5.spring.TapestrySpringFilter) BUT they have to place a blank applicationContext.xml in WEB-INF/ folder. IF they want they can override the dedicated Symbol to change the context configuration. This is not pretty, but it allows me to plug any number of JAR without a single modification after. - Stopping using ApplicationContextCustomizer and telling end users that they need for each JAR to provide the correct path for the contextConfigLocation xml file. It look like prettier but, damnit, this is f*cking configuration and I hate that :-) What would you choose? ...by the way, I know that Tapestry 5.2 is going to change lot of Spring things, maybe that point is going to evolve? Regards, Robin K -- Atos Worldline ________________________________ Ce message et les pi?ces jointes sont confidentiels et r?serv?s ? l'usage exclusif de ses destinataires. Il peut ?galement ?tre prot?g? par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir imm?diatement l'exp?diteur et de le d?truire. L'int?grit? du message ne pouvant ?tre assur?e sur Internet, la responsabilit? du groupe Atos Origin ne pourra ?tre recherch?e quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'exp?diteur ne donne aucune garantie ? cet ?gard et sa responsabilit? ne saurait ?tre recherch?e pour tout dommage r?sultant d'un virus transmis. This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.