JNDIENC

Enables applications to use the JNDI Environment Naming Context (ENC) when looking up JDBC data source names using JNDI.

Syntax:

JNDIENC=jndiEnc

Parameters:

jndiEnc The JNDI ENC specification.

Properties:

Default: An empty string.

Scope:

Used at compile time: Yes
Behavior at run time: Process

See Scope - OpenESQL SQL Compiler Directive Options for more information.

Comments:

  • You can test the JNDIENC directive option using Simple-JNDI by adding ENC-specific code to the jndi.properties file. For example:
    # Use an Environment Naming Context (ENC)
    org.osjava.sj.space=java:/comp/env
    # LDAP/XPath like delimiters
    org.osjava.sj.delimiter=/
    JNDIENC is not required when using Simple-JNDI in standalone applications; however, it can be useful if you intend to deploy your standalone application to a Java application server because it eliminates the need to change the JNDIENC setting when switching between test and deployment environments.
  • When deploying applications to a Java application server, JNDIENC is required to specify the ENC that the server uses for data sources. For example, the Tomcat server requires:
    SQL(JNDIENC=java:/comp/env)