Deploying a BIRT Report to an Application Server : Using connection pooling on Tomcat : Using a jndi.properties file
 
Using a jndi.properties file
Each individual JNDI application on the web application server uses its own environment settings stored in the JVM system properties.
The JNDI reads the following standard JNDI properties from the system properties:
java.naming.factory.initial
java.naming.factory.object
java.naming.factory.state
java.naming.factory.control
java.naming.factory.url.pkgs
java.naming.provider.url
java.naming.dns.url
To simplify the task of setting up the JNDI initial context environment for an individual JNDI application, the JNDI feature supports the use of a jndi.properties resource file. Install this file in the drivers subfolder of the oda.jdbc plugin located at the following path:
WEB-INF\platform\plugins\org.eclipse.birt.report.data.oda.jdbc_<version>\drivers
This file contains a list of key-value pairs in the properties file format, key=value. The key is the name of the property, and the value is a string, for example, java.naming.factory.object=jnp://localhost:1099.
Here is an example of a JNDI resource file used with JBoss application server:
java.naming.factory.initial=
org.jnp.interfaces.NamingContextFactory
java.naming.provider.url=jnp://localhost:1099
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
The JDBC run-time driver looks for the jndi.properties file in the web application's folder tree. If the driver does not find the file or has a problem reading from it, the initial context uses the default behavior, as defined by javax.naming.Context, to locate any JNDI resource files. Configuring the classpath for classes referenced by the environment properties is necessary.