

CA Risk Authentication Windows Installation Guide › Application Server Configuration for Database Connection Pooling › Enable Database Connection Pooling
Enable Database Connection Pooling
This section walks you through the steps to set up database connection pooling on the application server, where you have deployed CA Risk Authentication components.
Apache Tomcat
This section provides the steps to enable Apache Tomcat for JNDI-based database operations.
Follow these steps::
- Install the Apache Tomcat application server and test the installation by using the following URL:
http://localhost:8080/
- Open the server.xml file present in the <TOMCAT_HOME>/conf/ directory.
- Collect the following information required to define a data source:
- JNDI Name
-
Specifies the JNDI name used by CA Risk Authentication.
Important! This name must match with the AppServerConnection PoolName.N in arcotcommon.ini (without the java:comp/env/ prefix).
- User ID
-
Specifies the database user ID.
- Password
-
Specifies the database password.
- JDBC Driver Class
-
Specifies The JDBC driver class name. Example: oracle.jdbc.driver.OracleDriver
- JDBC URL
-
Specifies the JDBC URL for the database server. For example if you are using the Oracle driver, then URL will be:
jdbc:oracle:thin:<server>:<database_port>:<sid>
- Add the following entry to define the data source 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 available 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"/>
- To enable database connection pooling, download the following files from the corresponding third-party source. Then, copy these files to the following directories:
<TOMCAT_HOME>\common\lib\ folder (on Apache Tomcat 5.x) or
<TOMCAT_HOME>\lib\ directory (on Apache Tomcat 6.x and 7.x).
- commons-dbcp-1.2.2.jar
- ojdbc14-10.2.0.1.0.jar (for Oracle database)
- sqljdbc.jar (Microsoft JDBC driver for MS SQL Server 2005 - version 1.2.2828)
- mysql-connector-java-5.1.22-bin.jar (for MySQL database)
IBM WebSphere
This section provides the steps to enable IBM WebSphere for JNDI-based database operations.
Follow these steps::
- Log in to WebSphere Administration Console.
- Select Resources and expand the JDBC node.
- Click JDBC Providers.
- In the Preferences section, click New to create an appropriate JDBC provider based on the database that you are using.
- Perform the following tasks to create the JDBC Provider.
Note: For more information, refer to following link:
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/topic/com.ibm.websphere.base.iseries.doc/info/iseries/ae/tdat_ccrtprov.html
- Specify the Database Type and Provider Type.
- Select Connection pool data source from the Implementation Type drop-down list.
- Enter a Name for the JDBC provider. You can also enter a Description for the JDBC Provider.
- Click Next.
- Enter the absolute path for the JAR file.
- Click Next.
- After reviewing the summary of the information that you have entered, click Finish to complete the JDBC provider configuration.
- Set the CLASSPATH for the JDBC provider that you created in Step 5.
- Click Resources and expand the JDBC node.
- Click JDBC Providers.
- Click the JDBC Provider that you created in Step 5.
- Set the Class Path for the JDBC JAR.
- Click Apply to save the changes.
- Create a Data Source, as follows:
- Go to Resources, and then click JDBC.
- Under JDBC, open Data Sources and click New. Perform the following steps to create a data source:
- Specify the Data source name.
- Specify the JNDI name.
Note: This name must match with the value of AppServerConnection PoolName.N in arcotcommon.ini.
- Click Next.
- Select an existing JDBC provider created in Step 3.
- Click Next.
- Depending on the database, enter the following information:
- For Oracle:
Specify the Value for JDBC URL. This URL would be of the following type:
jdbc:oracle:thin:@<server>:<oracle_port>:<sid>
Select the Data store helper class name.
- For MS SQL Server:
jdbc:sqlserver://<server>:<sql_port>;databaseName=<databasename>;selectMethod=cursor
- For MySQL:
jdbc:mysql://<server>:<port-number>/<database>
- Click Next.
- Click Next to view the Summary screen, and then click Finish.
- Click the data source created in Step 8.
- In the Related Items section, click JAAS - J2C authentication data.
- Click New to create a new credential.
- Enter login credentials that are used to connect to the database and save the credential.
- Click Apply, and then click OK to save the changes made.
- Click Data Sources and select the data source that you created in Step 8.
- Under Security Settings, Component-managed authentication alias, select the JAAS credential that you created in Step 12 and click Apply, and then OK.
- Click Data Sources and select the check box for the data source you created in Step 8.
- Click Test connection to verify that you have specified the connection correctly.
Note: This test only checks the connection to the database server, not necessarily the correct definition of the data source.
Oracle WebLogic
This section walks you through the steps to enable Oracle WebLogic for JNDI-based database operations.
Follow these steps::
- Log in to WebLogic Administration Console.
- Click the Lock & Edit button in the Change Center, if it is not already done.
- Navigate to Services, JDBC, and the Data Sources.
- Under JDBC, open Data Sources and click New.
- Set the following JNDI and the database information:
- Set Name = ArcotDB
Note: This name must match with the value of AppServerConnection PoolName.N in arcotcommon.ini.
- Set JNDI Name = ArcotDB
- Select the required Database Type, for example Oracle.
- Select the required Database Driver, for example Oracle Thin Driver.
- Click Next, retain the default values and click Next again.
- In the Connection Properties page that appears, set the database connection details. For example, the values for Oracle can be:
- Database Name = SID or service name of the database server
- Host Name = Host name or the IP address of the database server
- Port = 1521 or any other port the database server is running
- Database User Name = Database account user name that can create the database connections
- Password / Confirm Password = Password for the specified Database User Name
- Click Next.
- Click Test Configuration to verify the database information that you specified.
- Click Next and set the preferred data source target server for the WebLogic server instance.
- Click Finish.
- Click the Activate button in the Change Center to enable the data source settings that you configured in the preceding steps.
JBoss Application Server
This section walks you through the steps to enable JBoss Application Server for JNDI-based database operations.
Follow these steps::
- Navigate to the location where you have deployed the WAR files, for example:
<JBOSS_HOME>\server\default\deploy\
- Create a data source descriptor file called arcotdatabase-ds.xml.
- Collect the following information required to define a data source in the arcotdatabase-ds.xml file:
- JNDI Name: The JNDI name used by CA Risk Authentication components. This name must match with the AppServerConnection PoolName.N in arcotcommon.ini (without the java:comp/env/ prefix).
- User ID: The database user ID.
- Password: The database password.
- JDBC Driver Class: The JDBC driver class name. For example, oracle.jdbc.driver.OracleDriver.
- JDBC URL: The JDBC URL for the database server.
For example, if you are using Oracle driver, then the URL will be: jdbc:oracle:thin:<server>:<database_port>:<sid>.
- Exception Sorter Class: The class for implementing the org.jboss.resource.adapter.jdbc.ExceptionSorter interface, which determines whether the exception indicates a connection error.
Use this parameter for Oracle database only. Set it to org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter.
- Open the arcotdatabase-ds.xml in a text editor.
- Add the following content:
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>SampleDS</jndi-name>
<connection-url><jdbcurl></connection-url>
<driver-class><JDBC Driver class></driver-class>
<user-name><database_userid></user-name>
<password><database_password></password>
<exception-sorter-class-name><Exception Sorter Class></exception-sorter-class-name>
</local-tx-datasource>
</datasources>
- Save and close the file.
Copyright © 2014 CA Technologies.
All rights reserved.
 
|
|