First of all, the feature to define JNDI entries as variables in configuration files is really great!

I agree, the suggested attributes (optional and default value) would be really helpful. The problem is that no one can say for sure if a JNDI entry is optional or mandatory when observing the occuring error in a log file. In our company we have to rely on documentation or defining even optional JNDI entries on production stages as mandatory for now to prevent error messages. We use Logback 1.0.13 with SLF4J as logging facade.

To simulate a default value for variables read from JNDI on a single point in the configuration file we do the following (I hope this is as intended):

<insertFromJNDI env-entry-name="cell/persistent/log.encoding" as="JNDI_LOG_ENCODING"/>
<property name="LOG_ENCODING" value="${JNDI_LOG_ENCODING:-UTF-8}"/>

Consider the following example with both attributes in action:

<insertFromJNDI env-entry-name="cell/persistent/foo.log.encoding" as="LOG_ENCODING" optional="true" default="UTF-8"/>

The Attribute optional could be omitted by only applying a default value implicitly defining it as optional, but this may not be as clear to read as the example shown above.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira