Dave wrote:
On 5/16/07, Sean Gilligan <[EMAIL PROTECTED]> wrote:
Lately, I've been using JNDI and Tomcat's context.xml for configuring
webapps (in turn I use Spring to do JNDI lookups and inject config
parameters, so components don't have dependencies on JNDI). By doing it
this way it is possible to produce an immutable WAR that doesn't need
any changes for deployment. All deployment-specific configuration
options go in context.xml (for Tomcat)
Pros:
1) WAR file is "immutable" artifact and compatible with all Servlet
containers
Yes, I'd definitely like to see an immutable WAR. We've got that now,
thanks to roller-custom.properties
But don't roller-custom.properties have to go in the WAR? It would be
nice to be able to change some options currently in
roller-custom.properties and use a WAR that was built by Apache.
unless you want to configure Acegi
for LDAP or SSO.
Even without LDAP or SSO, don't you have to change some keys?
I submitted a patch to make this a little easier by putting the settings
in an included XML file, see
http://opensource.atlassian.com/projects/roller/browse/ROL-1274
I don't know Acegi well, but I know Spring configuration pretty well,
and there are (at least) two other alternatives to the import-ed XML file:
1) Get the keys from JNDI
2) Get the keys from a properties file
I'd be willing to submit patches for #1 or #2 if we can agree on a good
way of doing it. We should be able to implement a fallback that checks
JNDI first, then properties. Spring XML doesn't do conditionals, but I
think we could write a simple factory bean that implements the fallback.
-- Sean