Applies to RiskVision Versions: 7.5, 8.0
Procedure to create a JNDI connection in JasperServer:
- Create a resource in the context.xml file
- Open file context.xml ('%ReportServer_Home%\apache-tomcat\webapps\jasperserver-pro\META-INF') in a text editor.
- Create a resource by adding the following text to the bottom of the file <Resource name="jdbc/RiskVision" auth="Container" type="javax.sql.DataSource" maxActive="100" maxIdle="30" maxWait="10000" username="reportuser" password="<password>" driverClassName="com.mysql.jdbc.Driver" validationQuery="SELECT 1" testOnBorrow="true" url="jdbc:mysql://localhost:3306/agiliance autoReconnect=true&autoReconnect ForPools=true"/> **Update with reportuser password and hostname reference
- Create a resource in the web.xml file
- Open file web.xml ('%ReportServer_Home%\apache-tomcat\webapps\jasperserver-pro\WEB-INF')
- Locate <resource-ref> tag in the file and append the following text with this reference. <resource-ref> <description>AgiJNDI </description> <res-ref-name>jdbc/agiliance</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref>
- Save and close this file.
- Set the Data source Type and Properties
- Login to JasperSoft as sysadmin http://localhost:8480/jasperserver-pro/login.html
- Click Create Datasource
- Enter values - Type: JNDI Data Source - Name: JNDI Agiliance - ID: JNDI Agiliance - Service Name: JNDI Agiliance - Save Location: /public/Data_Sources
- Click "Test Connection" and verify it is successful
- Click "Save" once the test connection is successful
- Open a report in edit mode, Click Data source and change data source to: /public/Data_Sources/JNDI_Agiliance
- Click submit
- Run one of the slow reports and let us know the timings.
For further details, refer to the JasperReports-Server-Admin-guide Section: JNDI Services. page 250 Explains how to create a resource in the context.xml and web.xml files Section: JNDI Data Sources page 71 Explains how to create a data source Contact product support if there are questions or issues with the defined process