Go to primary content
Oracle® Retail Integration Bus Service-Oriented Architecture Enabler Tool Guide
Release 16.0.023
E89674-01
  Go To Table Of Contents
Contents

Previous
Previous
 
 

C Appendix: Creating a JDBC Data Source

This section describes the steps required to create a JDBC data source.

Procedure

To create a JDBC data source, complete the following steps.

  1. Log in to the WebLogic administration console. Use this URL: http://<host>:<listen port>/console/login/LoginForm.jsp.

  2. Navigate the domain structure tree to Services/Data Sources.

  3. 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.

  4. Select the transaction options for the data source. Click Next.

  5. Enter the database name and user information for the data source. Click Next.

  6. 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.”

  7. 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.)

  8. Click Finish to complete the data source setup. The data sources page is displayed, including the new data source.

  9. 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.

  10. 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
    
  11. 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)))
    
  12. 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.

  13. Restart the WebLogic instance to reflect the data source changes.