Step 4: Creating a data source and connection pool

Create a JDBC data source and connection pool.

About this task

The data source is based on the database schema created as described in Step 3: Creating an empty database schema.

Note:

If you choose to use the Rule Execution Server console to create the database schema, you must create an empty database.

Procedure

  1. Ensure that your database is running.
  2. In the WebLogic Server administration console, in Domain Structure click Services > JDBC and click Data Sources.
  3. In the Summary of JDBC Data Sources page under Data Sources, click New.
  4. In the Create a New JDBC Data Source page, name your data source (for example, Rule Execution Server data source) and type jdbc/resdatasource for the JNDI name. Select a Database Type.

    Click Next.

  5. Select the Database Driver that to connect to the database. Use the XA database driver.

    Click Next.

  6. You are provided with information on Transaction Options and the driver you have selected.

    If you created a connection pool with a non-XA driver and you want to allow your data source to be involved in XA transactions, select Emulate Two-Phase Commit. You must also select Supports Global Transactions.

    Click Next.

  7. Define the Connection Properties.
    Database name

    Enter resdb.

    Host name

    Enter localhost.

    Port

    Enter the port (for example, 0 for the embedded Derby database).

    Database User Name

    Enter RES.

    Password

    Use RES and confirm it.

    Click Next.

  8. In the Test Database Connection page, click Test Configuration to ensure that the connection pool is operational. If the console displays the following message, your connection pool is ready to be used.
    Connection test succeeded.

    Click Next.

  9. In the Create a New JDBC Data Source page, under Select Targets and Servers select the check box next to AdminServer and click Finish.
  10. Click Activate Changes.

Results

After you have created the JDBC data source and connection pool, you can view the data pool properties for the selected data source.

To view the properties:

  1. In the Domain Structure open Services > JDBC and click Data Sources.

  2. In the Summary of JDBC Data Sources page, click the data source name.

  3. In the Settings page for the data source, click the Connection Pool tab. The page displays the data pool properties for the selected data source.