step1:Install JDBC Driver
copy the jdbc driver jar file used by JNDI Data Source service into the <Tomcat_Home>/common/lib folder.
step2: Declare Resource Requirements
In the webapps/xxxxx/WEB-INF/web.xml file, add the following entry to setup JNDI service:
<resource-ref>
<description>Resource reference to a factory for java.sql.Connection</description>
<res-ref-name>jdbc/JNDI_NAME</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
step3: Configure Tomcat's Resource Factory
In the webapps/xxxx/META-INF/context.xml file, add a resource entry to setup JNDI data source factory:. (configuring this in <Tomcat_Home>/conf/context.xml would apply to all web applications)
<resoucelink>
step4: add to server.xml file in $CATALINA_HOME/conf
<Resource auth="Container" name="jdbc/JNDI_NAME" type="javax.sql.DataSource"
password="password"
driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
maxIdle="2"
maxWait="5000"
validationQuery="select 1"
username="sa"
url="jdbc:sqlserver://server;databaseName=property"
maxActive="4"/>
step5: In report data source, specifie the JNDI URL as java:comp/env/jdbc/JNDI_NAME
Refence:
1.http://dev.eclipse.org/newslists/news.eclipse.birt/msg11346.html
2.https://bugs.eclipse.org/bugs/show_bug.cgi?id=131662#c7