-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
1 parent
e5ff97c
commit 8cc4ae6
Showing
3 changed files
with
11 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters