gtri/typesafeconfig-extensions — pull request #2 by chris-martin (2013-10-01 15:49:33+00:00)
Title: Changes to default webapp configuration from JNDI

I was previously using JNDI path mappings to map "jndi.config file" to "webapp.config.file" and "jndi.config directory" to "webapp.config.directory".

There are two problems with this:

1) I was thinking this made sense because the JNDI variable should be as straightforward as possible; the JNDI values don't get merged with the global config namespace, so they don't need to be prefixed to avoid name clashes.

Upon further consideration, I don't think it's worth having essentially two names than mean the same thing. So in the new setup, the JNDI variables are also called "webapp.config._" just like this config paths. This should be easier to explain and remember.

2) In the previous setup, setting the JNDI value "config file" would override the config value "webapp.config.file", so if you set both, only the one specified by JNDI would get loaded.

I think this was a counterintuitive choice because it's antithetical to the Config library's philosophy of merging configs. As further evidence that I was wrong, note that I described it incorrectly in the documentation. What I had written in the README and in the javadoc on WebappConfigs.webappConfigFactory(ServletContext) actually describes the new behavior after this commit.