11 Configuring JDBC Active GridLink Data Sources
This chapter describes how to configure the Oracle Communications MetaSolv Solution (MSS) JDBC Active GridLink (AGL) data sources to work in an Oracle Real Application Cluster (RAC) environment for MSS.
About Oracle RAC
Oracle RAC consists of two or more Oracle database instances that run on two or more clustered machines and access a shared storage device using cluster technology. The host machines for the database instances must be linked by a high-speed interconnection to form the cluster and enable communications among the nodes in the cluster.
Note:
For more information on configuring Oracle RAC, your clustering software, your operating system, and storage solution, see the documentation from the respective vendors.
For information using Oracle RAC with Oracle WebLogic Servers, refer to the Oracle Fusion Middleware Administering JDBC Data Sources for Oracle Weblogic Server documentation.
Creating the JDBC Active GridLink Data Sources
A single Active GridLink (AGL) data source provides connectivity between WebLogic Server and an Oracle Database service, which may include one or more Oracle RAC clusters. An Oracle Database service represents a workload with common attributes that enables administrators to manage the workload as a single entity. You scale the number of AGL data sources as the number of services increases in the database, independent of the number of nodes in the Oracle RAC clusters.
Note:
MSS supports only the failover algorithm (with remote listener enabled).
You can create JDBC Active GridLink data sources by doing one of the following:
JDBC Data Source Properties
JDBC data source properties include options on the data source identify and the handling of data for the database connection. Before creating data sources, you need to be familiar with this topic. For detailed information on JDBC data sources and their properties, see Fusion Middleware Administering JDBC Data Sources for Oracle WebLogic Server on the Oracle Help Center website at:
https://docs.oracle.com/en/middleware/fusion-middleware/index.html
Manually Creating the JDBC Active GridLink Data Sources
You must create the JDBC Active GridLink data sources manually. By default, the MSS installer creates the multi data sources when the Oracle RAC database is selected. A multi data source provides an ordered list of data sources to use to satisfy connection requests.
To create the JDBC Active GridLink data sources, perform the following tasks in the WebLogic Remote Console:
-
Deleting the existing multi data sources. See "Deleting Multi Data Sources" for more information.
-
Creating the following JDBC Active GridLink data sources:
-
mslvDataSource
-
mslvDbTraceDataSource
-
mslvNoneTxDataSource
-
mslvProcDataSource
-
mslvPSDataSource
-
mslvWSDataSource
See "Creating Active GridLink Data Sources" for more information.
-
-
Creating the following persistent stores:
-
mssJMSStore (and point it to mslvPSDatasource)
-
pluginstore (and point it to mslvPSDatasource)
See "Creating Persistent Stores" for more information.
-
-
Creating the following JMS servers:
-
mmsJMSServer (and point it to mssJMSStore)
-
pluginJMSServer (and point it to pluginstore)
See "Creating JMS Servers" for more information.
-
-
Creating the following JMS modules:
-
mssJMSModule
-
pluginModule
After you create mssJMSModule and pluginModule, you must create JMS module resources (such as queues and connection factories) and create the subdeployments for those resources. A subdeployment is a process for grouping JMS module resources and targeting them to a server instance or cluster.
See "Creating JMS Modules" for more information.
-
Deleting Multi Data Sources
To remove a multi data source, perform the following:
-
Log in to the WebLogic Server Remote Console.
-
In the Edit Tree, expand Services, and then click Data Sources.
The Summary of JDBC Data Sources page appears.
-
Select the check box beside each data source that you want to delete and click Delete.
Creating Active GridLink Data Sources
To create an Active GridLink data source:
-
Log in to the WebLogic Server Remote Console.
-
In the Edit Tree, expand Services, and then click Data Sources.
The Summary of JDBC Data Sources page appears.
-
Click New.
-
In the Name field, enter mslvDataSource.
-
In the JNDI Names field, enter the JNDI path to where this data source is bound. By default, the JNDI name is the name of the data source. For example, MSLVPool.
-
In Targets, select the servers or clusters on which you want to deploy the data source.
-
Select GridLink Data Source from the Data Source Type drop-down list.
-
From the Database Driver list, select any one of the following database drivers, depending on the Active GridLink data source that you are creating:
-
When creating mslvDataSource and mslvWSDataSource, select Oracle's Driver (Thin XA) for GridLink Connections Versions:Any.
-
When creating mslvDbTraceDataSource, mslvNoneTxDataSource, mslvProcDataSource, and mslvPSDataSource, select Oracle's Driver (Thin) for GridLink Connections; Versions:Any.
-
-
Optional: If you selected a non-XA driver, then select a Global Transactions Protocol from the following values:
-
Logging Last Resource
-
Emulate Two-Phase Commit
-
One-Phase Commit
For XA drivers, the system automatically selects the Two-Phase Commit protocol for global transaction processing.
-
-
Enter the connection details for the database that you want to connect to:
- Listeners: Enter the host and port; separate the host and the port of each listener with a colon. Enter each listener on a new line.
- Service Name: Specify the service name of the database to which you want to connect.
- Database User Name: Enter the database user account name that you want to use for each connection in the data source.
- Password: Enter the password for the database user account.
- Protocol: If required, change the value from TCP to SDP. To use Socket Direct Protocol (SDP), your database network must be configured to use Infiniband.
-
Select the Fan Enabled check box to subscribe to Oracle Fan Events.
-
In the ONS host and port field, enter the host and port for each ONS node separated by a comma.
-
If ONS is configured to use the SSL protocol, do the following:
-
In the ONS Wallet File Directory field, enter the directory of the Oracle wallet file in which the SSL certificates are stored.
-
In the ONS Wallet Password field, enter and confirm the ONS wallet password.
-
In the Confirm ONS Wallet Password field, enter the ONS wallet password again to confirm it.
-
- Click Create.
-
Repeat this procedure to create the remaining Active GridLink data sources: mslvDbTraceDataSource, mslvNoneTxDataSource, mslvProcDataSource, mslvPSDataSource, and mslvWSDataSource.
-
Proceed with "Tuning the Active GridLink Data Source".
Tuning the Active GridLink Data Source
After you create the Active GridLink data sources, you must tune each data source.
To tune each data source:
-
Log in to the WebLogic Remote Console.
-
In the Edit Tree, expand Services, and then click Data Sources.
The Summary of JDBC Data Sources page is displayed.
-
Select the target data source (for example, mslvDataSource1).
The Settings for <DataSource> page is displayed.
-
Click the Connection Pool tab.
The Connection Properties are displayed.
-
Click the Advanced tab to display additional configuration items.
-
In the Test Table Name field, clear the SQL SELECT 1 FROM DUAL entry and enter SQL ISVALID.
-
In the Inactive Connection Timeout field, enter 300.
-
Click Save.
-
Click Shopping Cart, then select Commit Changes.
Creating Persistent Stores
To create a persistent store:
-
Log in to the WebLogic Server Remote Console.
-
In the Edit Tree, expand Services, and then click JDBC Stores.
The Summary of JDBC Stores page appears.
-
Click New.
The Create a New JDBC Store page appears.
-
Do the following:
-
In the Name field, enter mssJMSStore.
-
From the Target list, select a server instance on which you want to deploy the JDBC store.
-
From the Data Source list, select mslvPSDataSource.
-
In the Prefix Name field, specify a prefix that is added to the table name in this JDBC store.
-
Click Create.
-
Repeat this procedure to create the pluginstore persistent store and point it to mslvPSDatasource.
-
Creating JMS Servers
To create a JMS server
-
Log in to the WebLogic Server Remote Console.
-
In the Domain Structure tree, expand Services, then expand Messaging, and then click JMS Servers.
The Summary of JMS Servers page appears.
-
Click New.
The Create a New JMS Server Properties page appears.
-
Do the following:
-
In the Name field, enter mssJMSServer.
-
From the Persistent Store list, select mssJMSStore.
-
Click Finish.
-
Repeat this procedure to create the pluginJMSServer JMS server and point it to pluginstore.
-
Creating JMS Modules
To create a JMS module:
-
Log in to the WebLogic Server Remote Console.
-
In the Edit Tree, go to Services, then JMS Modules.
The Summary of JMS Modules page appears.
-
Click New.
The Create JMS System Module page appears.
-
In the Name field, enter mssJMSModule.
-
Click Create.
The JMS Modules details page appears.
-
On the Target tab, from the Target drop-down list, select a server instance or cluster on which to deploy the JMS system module.
-
Click Save.
The mssJMSModule JMS module is created. You can create the resources for the newly created JMS module.
-
To add resources, select the JMS system module that you want to configure resources for.
-
In the Navigation Tree, as child nodes of JMS system module that you selected, click the resource(such as Connection Factory, Queue, Topic, and so on) that you want to configure.
-
Enter the required information for the selected resource.
Certain resources may encourage you to configure an appropriate subdeployment. A subdeployment is the mechanism by which targetable JMS module resources (such as queues, topics, and connection factories) are grouped and targeted to a server resource (such as JMS servers, server instances, or cluster).
Most JMS resources have additional parameters that can be modified after they are created. For example, you can modify the default message threshold values or enable message logging for queues, topics, and templates.
Note:
When creating a JMS module resource, do not specify a sub deployment; instead, after creating the JMS resource, edit the resource and then specify a sub deployment for that resource. See "Configuring Sub Deployments for JMS Module Resources" for more information.
-
Click Create.
Click Shopping Cart, then select Commit Changes, which activates these changes.
-
Repeat this procedure to create the pluginModule JMS module.
Configuring Sub Deployments for JMS Module Resources
After you create the resources for the JMS module, edit the resource, and then specify a sub deployment for that resource.
To configure a sub deployment for a JMS module resource:
-
Log in to the WebLogic Remote Console.
-
In the Edit Tree, expand Services, and then click JMS Modules.
The Summary of JMS Modules page appears.
-
Click mssJMS module.
The Settings for mssJMSModule page appears.
-
In the navigation tree, select Sub Deployments.
-
Click New.
The Create a new Sub Deployment page opens.
-
Enter Name and click Create.
-
Click Save.
- In Shopping Cart, select Commit Changes.
-
In the Navigation Tree, click the resource (Queues, Connection Factories and so on) for which you want to configure sub deployment.
-
In the General tab, enter the corresponding sub deployment in Sub Deployment Name.
-
Click Save.
-
Repeat this procedure to configure sub deployments for the resources of pluginModule.
Creating JDBC Active Data Sources by Updating the Configuration Files
Creating the JDBC Active GridLink data sources by updating configuration files involves doing the following tasks in the WebLogic Remote Console:
-
Encrypting Clear Text Passwords in WebLogic Server Domain Configuration Files
-
Deleting Multi Data Source Instances from the config.xml File
Note:
Before converting Multi Data Sources to Active GridLink Data Sources, you must do the following:
-
Take a backup of all Multi Data Sources
-
Take a backup of the config.xml file that is located in the mslvdomain\config directory, where mslvdomain is the name of the domain directory you specified during domain configuration.
Encrypting Clear Text Passwords in WebLogic Server Domain Configuration Files
Each Active GridLink data source is represented by a configuration XML file for the RAC domain in the mslvdomain\config\jdbc directory. For example, mslvWSDataSource-8065-jdbc.xml, mslvProcDataSource-9573-jdbc.xml, and so on.
where:
mslvdomain is the name of the domain directory you specified during domain configuration.
You must encrypt the clear text passwords in each domain configuration XML file for all the data sources to protect them from unauthorized access. You encrypt passwords using the java weblogic.security. Encrypt utility, which you must run from within the mslvdomain folder.
Ensure that you encrypt passwords for the following database users: APP_MSLV, APP_API, and APP_INT.
To encrypt clear text passwords in WebLogic Server domain configuration files:
-
Change directory to your domain's bin folder.
For example:
cd MW_HOME\user_projects\domains\mslvdomain\bin
-
Run the setDomainEnv script. For example, setDomainEnv.cmd (Windows) or setDomainEnv.sh (UNIX/Linux).
-
Navigate to the mslvdomain directory and run the java weblogic.security.Encrypt utility. This utility prompts you for a password, and then displays the encrypted password.
The following is a sample output from running this utility:
C:\MW_HOME\user_projects\domains\mslvdomain>java weblogic.security.Encrypt Password: {3DES}9HWsf87pJTw=
-
Navigate to the mslvdomain\config\jdbc directory.
-
Copy the encrypted passwords for all the data sources and paste these passwords in the <password> element within the XML file for each data source (mslvWSDataSource, mslvProcDataSource, mslvPSDataSource, mslvNoneTxDataSource, mslvDbTraceDataSource, and mslvDataSource).
Note:
You can generate a new password or you can copy the password from the Multi Data Source backup.
Deleting Multi Data Source Instances from the config.xml File
To delete the multi data sources instances from the config.xml file:
-
Edit the mslvdomain\config\config.xml file.
-
Remove all the instances of multi data sources.
For example, remove the entries for the following data sources: mslvDataSource1, mslvDbTraceDataSource1,mslvNoneTxDataSource1, mslvProcDataSource1, mslvWSDataSource1, mslvPSDataSource1, mslvDataSource2, mslvDbTraceDataSource2, mslvNoneTxDataSource2, mslvProcDataSource2, mslvWSDataSource2, mslvPSDataSource2, and so on:
<jdbc-system-resource> <name>mslvDataSource1</name> <target>RacConfigServer</target> <descriptor-file-name>jdbc/mslvDataSource1-0700-jdbc.xml </descriptor-file-name> </jdbc-system-resource> <jdbc-system-resource> <name>mslvDbTraceDataSource1</name> <target>RacConfigServer</target> <de-scriptor-file-name>jdbc/mslvDbTraceDataSource1-8405-jdbc.xml </descriptor-file-name> </jdbc-system-resource> . . . <jdbc-system-resource> <name>mslvWSDataSource2</name> <target>RacConfigServer</target> <descriptor-file-name>jdbc/mslvWSDataSource2-5599-jdbc.xml </descriptor-file-name> </jdbc-system-resource> <jdbc-system-resource> <name>mslvPSDataSource2</name> <target>RacConfigServer</target> <de-scriptor-file-name>jdbc/mslvPSDataSource2-5450-jdbc.xml </descriptor-file-name> </jdbc-system-resource>
-
Save and close the config.xml file.
-
Restart the application server.
Modifying the Classpath for the WebLogic Server Domain
To update the classpath for the WebLogic domain:
-
Edit the mslvdomain\bin\setDomainEnv.cmd file.
-
Add the path for the ons.jar file to the CLASSPATH environment variable.
For example:
set CLASSPATH=%CLASSPATH%;C:\Oracle\Middleware\Oracle_Home\oracle_common\lib\ons.jar;
-
Save and close the file.
Configuring the Connection Pool Parameters
To configure the connection pool parameters:
-
Navigate to the mslvdomain\config\jdbc folder.
-
Edit each XML file for the mslvWSDataSource, mslvDbTraceDataSource, mslvNoneTxDataSource, mslvProcDataSource, mslvPSDataSource, and mslvWSDataSource data sources, and update the <jdbc-connection-pool-params> element as follows:
<jdbc-connection-pool-params> <initial-capacity>10</initial-capacity> <max-capacity>100</max-capacity> <min-capacity>2</min-capacity> <highest-num-waiters>1000</highest-num-waiters> <connection-reserve-timeout-seconds>60</connection-reserve-timeout-seconds> <test-connections-on-reserve>true</test-connections-on-reserve> <inactive-connection-timeout-seconds>14400 </inactive-connection-timeout-seconds> <test-table-name>SQL ISVALID</test-table-name> <statement-timeout>0</statement-timeout> </jdbc-connection-pool-params> -
Save and close the XML file for each data source.
Example 11-1 shows sample XML for one data source.
Example 11-1 Sample of One Data Source
<jdbc-data-source>
<name>DataSourceName</name>
<datasource-type>AGL</datasource-type>
<jdbc-driver-params>
<url>jdbc:oracle:thin:@server:port/DB</url>
<driver-name>oracle.jdbc.xa.client.OracleXADataSource</driver-name>
<properties>
<property>
<name>user</name>
<value>user_name</value>
</property>
</properties>
<password-encrypted></password-encrypted>
</jdbc-driver-params>
<jdbc-connection-pool-params>
<test-table-name>SQL ISVALID</test-table-name>
</jdbc-connection-pool-params>
<jdbc-data-source-params>
<jndi-name>JNDIName</jndi-name>
<global-transactions-protocol>TwoPhaseCommit
</global-transactions-protocol>
</jdbc-data-source-params>
<jdbc-oracle-params>
<fan-enabled>true</fan-enabled>
<ons-node-list />
<ons-wallet-file />
<active-gridlink>true</active-gridlink>
</jdbc-oracle-params>
</jdbc-data-source>Note:
Some lines in the example are wrapped for the display.
Tuning JDBC Multi Data Source
For each data source perform the steps in this procedure to tune the data sources.
To tune each data source:
-
Ensure you are logged into the WebLogic Remote console.
-
In the Domain Structure tree, expand Services, and then click Data Sources.
The Summary of JDBC Data Sources page is displayed.
-
Select the target data source (for example, mslvDataSource1).
The Settings for <DataSource> page is displayed.
-
Click the Connection Pool tab.
The Connection Properties are displayed.
-
Click Lock and Edit.
-
Scroll down to Initial Capacity and Maximum Capacity.
-
In the Initial Capacity field, enter 1.
-
In the Maximum Capacity field, enter 15.
Note:
The values of the Initial Capacity and Maximum Capacity fields depend on their particular MSS deployment.
-
Scroll down to the bottom of the page and click Save.
The Settings for <DataSource> page is displayed.
-
Click Advanced to display additional configuration items.
-
Select the Test Connections On Reserve check box.
-
Click Save.
The Settings for <DataSource> page is displayed.
-
Click the Transaction tab.
The Transaction Properties are displayed.
-
Select the Set XA Transaction Timeout check box.
-
In the XA Transaction Timeout field, enter 3600.
-
In the XA Retry Duration field, enter 300.
-
Click Save.
-
Click Activate Changes.
The Settings updated successfully message is displayed.