Oracle® Retail Integration Bus Service-Oriented Architecture Enabler Tool Guide Release 19.0 F22952-01 |
|
![]() Previous |
This section describes the steps required to create a JDBC data source.
To create a JDBC data source, complete the following steps.
Log in to the WebLogic administration console. Use this URL: http://<host>:<listen port>/console/login/LoginForm.jsp.
Navigate the domain structure tree to Services/Data Sources.
Click New to create the new data source. Enter the following required information.
Name: Select any name for the data source,
JNDI name: This field must be set to jdbc/RetailWebServiceDs. The generated code for the service uses this JNDI name to look up the data source.
Select the transaction options for the data source. Click Next.
Enter the database name and user information for the data source. Click Next.
The connection information for the data source is displayed. Click Test Configuration to ensure the connection information is correct. If the information is correct, the following message is displayed: ”Connection test succeeded.”
Click Next. Select a server to which to deploy the data source. (This step is not required at this point in the procedure if you want to deploy the data source to a server at a later time.)
Click Finish to complete the data source setup. The data sources page is displayed, including the new data source.
Click the new data source to see the properties page. A default connection pool is created for the data source. Click the Connection Pool tab to view the connection pool properties.
The generated JDBC connection URL for the data source is displayed in the following format:
jdbc:oracle:thin:@<hostname>:<port>:<sid> (jdbc:oracle:thin:@<hostname>:<port>/<sid> for service connections)
For example:
jdbc:oracle:thin:@localhost:1521:orc
If the database is a RAC database, the URL should be in the following format:
jdbc:oracle:thin:@(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = <host>)(PORT = <port>))(ADDRESS = (PROTOCOL = TCP)(HOST = <host>)(PORT = <port>))(LOAD_BALANCE = yes))(CONNECT_DATA =(SERVICE_NAME = <sid>)))
For example:
jdbc:oracle:thin:@(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = dbhost1.example.com)(PORT = 1521))(ADDRESS = (PROTOCOL = TCP)(HOST = dbhost1.example.com)(PORT = 1521))(LOAD_BALANCE = yes))(CONNECT_DATA =(SERVICE_NAME = orcl)))
In the Configuration > Connection Pool tab of the data source, set the following properties.
Initial capacity: Set the value to 20 connections. This value should be increased or decreased based on the expected load on the server.
Maximum capacity: Set the value to 100 connections. This value should be increased or decreased based on the expected load on the server.
Capacity Increment: Set the value to 20 connections. This value should be increased or decreased based on the expected load on the server.
Inactive Connection Time-out: This property is available in the advanced section of the connection pool configuration. Set the value of this property to 60 seconds.
Remove Infected Connections Enabled: This check box must be unchecked.
Restart the WebLogic instance to reflect the data source changes.