Create a JNDI connection in Apache Tomcat
This section describes the steps to enable Apache Tomcat for JNDI-based database operations, including connection pooling, in CA Strong Authentication.
aa813test
This section describes the steps to enable Apache Tomcat for JNDI-based database operations, including connection pooling, in CA Strong Authentication.
Follow these steps
:- Install Apache Tomcat, and test the installation using the following URL:http://localhost:8080/The preceding URL must open the Apache Tomcat home page.
- Open the server.xml file present in the<TOMCAT-HOME>/conf directory.
- Collect the following information for defining a data source:
- JNDI NameThe JNDI name that is used by the product components. This name must match with the AppServerConnectionPoolName.Nin arcotcommon.ini (without the java:comp/env/ prefix).
- User IDThe database user ID.
- PasswordThe database password.
- JDBC Driver ClassThe JDBC driver class name. For example, oracle.jdbc.driver.OracleDriver.
- JDBC URLThe JDBC URL for the database server. For example, if you are using Oracle driver, then URL would be: jdbc:oracle:thin:@<server>:<database_port>:<sid>.
- Add the following entry to define the datasource within the <GlobalNamingResources> tag:<Resource name="SampleDS"auth="Container"type="javax.sql.DataSource"factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"username="<userid>"password="<password>"driverClassName="<JDBC driver class>"url="<jdbc-url>"maxWait="30000"maxActive="32"maxIdle="8"initialSize="4"timeBetweenEvictionRunsMillis="300000"minEvictableIdleTimeMillis="30000"/>
- Open the context.xml file present in the<TOMCAT-HOME>/conf directory.
- Add the following entry to define the datasource within the <Context> tag:<ResourceLink global="SampleDS" name="SampleDS" type="javax.sql.DataSource"/>
- Copy the following database connection pooling (DBCP) dependencies to<TOMCAT-HOME>/common/libdirectory.
- commons-dbcp-1.2.2.jar
- ojdbc14-10.2.0.1.0.jar (for Oracle Database)
- sqljdbc.jar (Microsoft JDBC driver for Microsoft SQL Server 2005 - version 1.2.2828)