CEPM Install and Config Guide
Using Connection Pools

Table Of Contents

Using Connection Pools

Setting Up WebLogic Connection Pool for PAP

Setting Up WebLogic Connection Pool for PDP

Setting Up WebSphere Connection Pool for PAP

Configuring WebSphere Connectionpool for PDP


Using Connection Pools


Considered to be one of the best practices for a steady increase in performance of any application running in WebLogic or WebSphere server, CEPM highly recommends using a connection pool for a better performance and an effective policy management solution.

In the CEPM, you can create a connection pool for the PAP and PDP. As a first step to create connection pool in PAP, you need to create the connection pool and then update the <properties> tag of the pap_config.xml file. Similarly, in PDP side, you must update the <properties> tag of the pdp_config.xml file.

This chapter describes the steps to create connection pools in WebLogic and WebSphere server:

Setting Up WebLogic Connection Pool for PAP

To set up WebLogic connection pool for PAP, follow these steps:

I. Create connection pool in WebLogic 9.2/10


Note For MSSQL, before configuring the connection pool, copy sqljdbc.jar file from CEPM;V3.3.0.0/lib folder to bea/user_projects/domains/<domain_name>/lib folder.



Step 1 Go to the WebLogic console

Step 2 Choose Services > JDBC > Data Sources.

Step 3 Click Lock & Edit button.

Step 4 Click New button located on the top of the Data Source table.

Step 5 This opens the Create New JDBC Data Source page. Give values for the following fields:

Name of the data source.

JNDI Name for the data source.


Note The same JNDI name must be mentioned in the ConnectionPool tag of pap_config.xml and pdp_config.xml files.


From the Database Type list, choose the database type.

From the Database Driver list, choose the appropriate driver.

For Oracle: Oracle's Driver (Thin) Versions:9.0.1,9.2.0,10

For MSSQL: Microsoft's MS SQL Server Driver (Type 4) Versions:2005

For DB2: BEA's DB2 Driver (Type4) Versions:7.X,8.X

Click Next.

Step 6 The Transaction option page is displayed. Click Next.

Step 7 The Connection properties window is displayed.Give values for the following fields:

Enter the Database Name (schema name).

Enter the Host name and Port number.

Enter the database username and password.

Click Next.

Step 8

Step 9 Click Test Configuration. Once the connection is successful, click Next.

Step 10 In the Select Target page, select Admin User.

Step 11 Click the Finish.

Step 12 Click on Activate Changes button (in the top of the left navigation pane).

This creates the necessary JDBC Datasource as well as the connectionpool.

II. Update <properties> tag of pap_config.xml

You must update the CEPM-V3.3.0.0/config/pap_config.xml file to use the WebLogic connection pool you just created. Consider the following connection pool tag of a sample pap_config file:

<!--Config file for PAP-->

<cepm>
    <db name="default">
    <impl>net.securent.util.db.WebLogicConnectionPool</impl>
    <properties>
        <db-type>oracle</db-type>
        <initial-context-factory>weblogic.jndi.WLInitialContextFactory</initial-context- 
          factory>
        <context-provider-url>t3://host:9000</context-provider-url>
        <context-username>weblogic</context-username>
        <context-password>++7XL4YWJ/FEq6iEZjvEnQ==</context-password>
        <datasource-jndi>SampleJNDI</datasource-jndi>
        <poolName>Default Domain</poolName>
    </properties>
</cepm>

Step 13 Replace the value of the <impl> tag with net.securent.util.db.WebLogicConnectionPool".

Step 14 Update the <properties> tag parameters with the following values:

<context-provider-url>: refers to the URL where the WebLogic server is running with the connection pool.

<context-username>: refers to the username of the domain where the server is running.

<context-password>: refers to the password of domain.

<datasource-jndi>: refers to the JNDI name of the WebLogic connection pool, which was created in step 5.

<poolName>: refers to the domain name created in the PAP.

Step 15 Save and close the pap_config file.

III. Restart the WebLogic server.


Setting Up WebLogic Connection Pool for PDP

The process of creating this connection pool is same as that for creating one for the PAP except for the following updates that must be made in the <properties> tag of the pdp_config.xml:

Update <properties> tag of pdp_config.xml

You must update the CEPM-V3.3.0.0/config/pdp/pdp_config.xml file to use the WebLogic connection pool you created.

<!—sample Config file for PDP-->

<securent>
   <db authEnable="true">
   <impl>net.securent.util.db.WebLogicConnectionPool</impl>
   <properties>
      <db-type>oracle</db-type>
      <initial-context-factory>weblogic.jndi.WLInitialContextFactory</initial-context-fact
ory>
      <context-provider-url>t3://host:9000</context-provider-url>
      <context-username>weblogic</context-username>
      <context-password>++7XL4YWJ/FEq6iEZjvEnQ==</context-password>
      <datasource-jndi>SampleJNDI</datasource-jndi>
      <poolName>Default Domain</poolName>
   </properties>
</securent>

Update the <properties> tag parameters with the following values:

<context-provider-url>: refers to the URL where the WebLogic server is running with the connectionpool.

<context-username>: refers to the username of the domain where the server is running.

<context-password>: refers to the password of domain.

<datasource-jndi>: refers to the JNDI name of the WebLogic connection pool, which was created in step 5.

<poolName>: refers to the domain name created in the PAP.

Setting Up WebSphere Connection Pool for PAP

To set up WebSphere connection pool for PAP, follow these steps:

I. Create connection pool in WebSphere


Step 1 Login to the WebSphere console.

Step 2 Choose Resources > JDBC > Datasource.

Step 3 Click New.

Step 4 Specify the Datasource and JNDI name and Click Next.


Note The JNDI name mentioned in this field must be similar to the one mentioned in the Websphere connection pool properties of pap_config.xml and pdp_config.xml files.


Step 5 Select Create New JDBC Provider and click Next.

Step 6 From the Database Type list, select the appropriate database (CEPM supports Oracle, MSSQL Server and DB2):

For Oracle: Oracle JDBC driver provider

For MSSQL: DataDirect ConnectJDBC driver type4 driver for MS SQL Server

For DB2: DB2 Universal JDBC driver provider

Step 7 From the Implementation Type drop-down menu, select Connection pool datasource. The same implementation type should be selected for all database types.

Step 8 Click Next.

Step 9 Enter the directory path for the database supporting jar files. For example:

For Oracle: Directory location of ojdbc14.jar file.

Oracle 9i - the relevant jar file is CEPM-V3.3.0.0/lib/9i/ojdbc149i.jar

Oracle 10g - the relevant jar file is CEPM-V3.3.0.0/lib/9i/ojdbc1410g.jar

Oracle 11g - the relevant jar file is CEPM-V3.3.0.0/lib/9i/ojdbc6.jar

Copy the required jar file from the above mentioned location into IBM/Websphere/AppServer/lib and rename it to ojdbc14.jar.

For MSSQL: Directory location of sqljdbc.jar file. This file is located at CEPM-V3.3.0.0/lib folder. Copy this jar file from the above mentioned location into IBM/Websphere/AppServer/lib.

For DB2: Directory location of db2jcc.jar, db2jcc_license_cisuz.jar and db2jcc_license_cu.jar files. This file is located at CEPM-V3.3.0.0/lib folder. Copy this jar file from the above mentioned location into IBM/Websphere/AppServer/lib.

Step 10 Click Next.

Step 11 Select the datasource provider type. For example, enter the same JDBC URL as mentioned in the configure.properties file and click Next.

Step 12 Verify the summary and click Finish. This creates the specified datasource.

Step 13 Provide the database credentials (for example, username and password) in the following ways:

a. Create a username. To do this:

Choose JDBC > Datasource in the console and click the newly created datasource.

In the new screen, click Custom properties located top-left. Click New to create a new name value pair.

Enter the name value pair such as

Name: user

Value: username (that is, the database username)

Click OK.

b. Create a password. To do this:

Choose JDBC > Datasource in the console and click the newly created datasource.

In the new screen, click Custom properties located top-left. Click New to create a new name value pair.

Enter the name value pair such as

Name: password

Value: <password> (that is, the database password)

Click OK.

Step 14 After creating the username and password for the connection pool, click Save to save the settings.

Step 15 To test whether the connection pool has been created successfully, select the new datasource and click Test Connection. The result will be displayed on the top of the screen.

II. Update <properties> tag of pap_config.xml

You must update the CEPM-V3.3.0.0/config/pap_config.xml file to use the WebSphere connection pool you just created. Consider the following connection pool tag of a sample pap_config file:

<!--Config file for PAP-->
<securent>
   <db name="default">
   <impl>net.securent.util.db.WebSphereConnectionPool</impl>
   <properties>
     <db-type>oracle</db-type> 
     <initial-context-factory>com.ibm.websphere.naming.WsnInitialContextFactory</initial-c
ontext-factory> 
     <context-provider-url>iiop://host:2809</context-provider-url> 
     <context-username>cepm</context-username> 
     <context-password>uYgp9FZIEnREq6iEZjvEnQ==</context-password> 
     <datasource-jndi>WSJNDI</datasource-jndi> 
     <poolName>Default Domain</poolName>
   <properties>
</securent>

Step 16 Replace the value of the <impl> tag with net.securent.util.db.WebSphereConnectionPool.

Step 17 Update the <properties> tag in the following way:

Update the <db-type> tag to oracle.

Update the initial context factory.

Update <context-provider-url> to refer to the URL where the WebSphere server is running with the connection pool. The port number must be 2809 which is the default iiop port number.

<context-username>: refers to the username of the domain where the server is running

<context-password>: refers to the encrypted password of domain

<datasource-jndi>: refers to the JNDI name of the WebSphere connection pool, which was created in Step 4

<poolName>: refers to the domain name created in the PAP

Step 18 Save and close the configuration file.

III. Restart the WebSphere server .

Configuring WebSphere Connectionpool for PDP

The process of creating this connection pool is same as that for creating one for the PAP except for the following updates that must be made in the <properties> tag of the pdp_config.xml:

You must update the CEPM-V3.3.0.0/config/pdp/pdp_config.xml file to use the WebSphere connection pool you created. Sample <properties> tag of pdp_config.xml file:

<securent>
<db authEnable="true">
	<impl>net.securent.util.db.WebSphereConnectionPool</impl>
	<properties>
		<db-type>oracle</db-type>
		
<initial-context-factory>com.ibm.websphere.naming.WsnInitialContextFactory</initial-contex
t-factory>
		<context-provider-url>iiop://localhost:2809</context-provider-url>
		<context-username>websphere</context-username>
		<context-password>++7XL4YWJ/FEq6iEZjvEnQ==</context-password>
		<datasource-jndi>SampleWebsphereJNDIForCEPMDomain</datasource-jndi>
		<poolName>Default Domain</poolName>
	</properties>
</securent>

Where,

- <context-provider-url> refers to the URL of the WebSphere server domain where the connectionpool is running.

- <context-username> refers to the username of the WebSphere server domain.

- <context-password> refers to the encrypted password of the WebSphere server domain. The encrypted password can obtained by using encryptor.bat(sh) file available in the CEPM installer.

<datasource-jndi>: refers to the JNDI name of the WebSphere connection pool, which was created in Step 4

- <poolName> refers to the domain (entitlement repository) name created in PAP.