Configure JNDI - Tomcat
For MySQL
How to Configure JNDI
- Copy the 
mysql-connector-java-8.0.12.jarfrom theQuantumFabric_Plugins\resourcesfolder. - Paste the 
mysql-connector-java-8.0.12.jarfile under user install directory inside the Tomcat > Lib folder - for example,<User install directory>\apache-tomcat-9.0.33\lib. 
How to Configure Data Source - Accounts
- Create the accounts.xml file in the 
<User install directory>\apache-tomcat-9.0.33\conf\Catalina\localhostfolder. - In the accounts.xml file, create two entries one for accounts and the other for reports by using the following template:
<Resource auth="Container" testOnBorrow="true" testWhileIdle="true" validationQuery="SELECT 1" driverClassName="<DB_Driver>" logAbandoned="true" maxActive="10" maxIdle="5" maxWait="120000" name="<JNDI_NAME>" scope="Shareable" type="javax.sql.DataSource" url="<DB_connection_String>" username="<USER_NAME>" password="<PWD>"/>
 - In the above created file, add the following data source configurations:
In the following data source configurations, you must replace the following fields with appropriate values to access the database.
The following table details field names to be configured for data source:
Field Name Value <DB_Driver> Database specific driver,
- MySQL:	
com.mysql.jdbc.Driver - ORACLE:	
oracle.jdbc.driver.OracleDriver - MSSQL: 		
com.microsoft.sqlserver.jdbc.SQLServerDriver 
<JNDI_NAME> - jdbc/konyaccounts
 - jdbc/konyreports
 
<PWD>Database password <DB_connection_String>Database connection string for the accounts and reports db
- MySQL:	
jdbc:mysql://hostname:port/databaseName?autoReconnect=true&useSSL=false - ORACLE:	
jdbc:oracle:thin:@hostname:port Number:databaseName - MSSQL: 		
jdbc:sqlserver://DBHOSTIP[\DBINSTANCENAME]:PORT;databasename=DBNAME 
<USER_NAME>Database username. For example, root  - MySQL:	
 - Save the 
accounts.xmlfile. 
How to Configure Data Source - Workspace
- Create the workspace.xml file in the 
<User install directory>\apache-tomcat-9.0.33\conf\Catalina\localhostfolder. - In the workspace.xml file, create two JNDI entries one for workspacesglobaldb and the other for waasglobaldb by using the following template:
IMPORTANT: The JNDI names (for workspacesglobaldb and waasglobaldb) should point to same datasource.
<Resource auth="Container" testOnBorrow="true" testWhileIdle="true" validationQuery="SELECT 1" driverClassName="<DB_Driver>" logAbandoned="true" maxActive="10" maxIdle="5" maxWait="120000" name="<JNDI_NAME>" scope="Shareable" type="javax.sql.DataSource" url="<DB_connection_String>" username="<USER_NAME>" password="<PWD>"/>
 - In the above created file, add the following data source configurations:
In the following data source configurations, you must replace the following fields with appropriate values to access the database.
The following table details field names to be configured for data source:
Field Name Value <DB_Driver> Database specific driver,
- MySQL:	
com.mysql.jdbc.Driver - ORACLE:	
oracle.jdbc.driver.OracleDriver - MSSQL: 		
com.microsoft.sqlserver.jdbc.SQLServerDriver 
<JNDI_NAME> jdbc/waasglobaldb
- jdbc/workspacesglobaldb
 
<PWD>Database password <DB_connection_String>Database connection string,
- MySQL:	
jdbc:mysql://hostname:port/databaseName?autoReconnect=true&useSSL=false - ORACLE:	
jdbc:oracle:thin:@hostname:port Number:databaseName - MSSQL: 		
jdbc:sqlserver://DBHOSTIP[\DBINSTANCENAME]:PORT;databasename=DBNAME 
<USER_NAME>Database username. For example, root  - MySQL:	
 - Save the 
workspace.xmlfile.