Creating a data source and a connection pool

You must create a data source and a connection pool to enable Decision Center.

Before you begin

To create a data source, you work in the WebSphere Integrated Solutions Console. Log in to the console as explained in Before you start: Opening the administration console.

About this task

If WebSphere Application Server is used in cluster mode, you must define the data source at node level in the cluster (as opposed to cluster level).

Procedure

To create a data source and a connection pool:

  1. In the WebSphere Integrated Solutions Console, open Resources > JDBC, and then click Data sources.
  2. In the Scope section, select the scope that you selected for the JDBC provider in Creating a JDBC provider, and click New.
  3. In Step 1, enter a name for the data source (for example, Decision Center Datasource), jdbc/ilogDataSource in the JNDI name field, and click Next.
  4. In Step 2, select Select an existing JDBC provider, and then select the non-XA JDBC provider that you created in Creating a JDBC provider, and click Next.
  5. In Step 3, enter the database properties for the data source and click Next.
    The following table shows the minimum set of mandatory properties to define the supported databases. If the table does not include your driver, check the WebSphere Application Server documentation for more information.
    Database Properties
    DB2® Universal JDBC Driver
    • databaseName: Database name if driverType is set to 4, or a locally cataloged database name if driverType is set to 2
    • driverType: 2 or 4

    For driverType 4:

    • serverName: TCP/IP address or host name
    • portNumber: TCP/IP port number
    DB2 legacy CLI-based Type 2 databaseName: for example, Sample.
    Oracle JDBC Driver URL: for example, jdbc:oracle:oci:@sample
    Derby
    • databaseName: path to the location of the database files. This directory must not exist already. For example, c:\dcdb.
    • Clear the option Use this data source in container managed persistence (CMP).

    For more information, refer to the Derby documentation.

  6. In Step 4, proceed as follows:
    • WebSphere Application Server for distributed platforms: Select the default values in the list and click Next.
    • WebSphere Application Server for Linux on z Systems™: Select the DB2 Administrator's authentication alias from the Component-managed authentication alias option, and then click Next.
  7. Click Finish.

    The connection pool is created and is associated with the data source. You must now change some custom properties.

  8. Click the name of the data source.
  9. Under Additional Properties, click Custom properties.
    From here, make the following custom changes to the data source.
    Table 1. Custom properties to set on the datasource
    Property Value Note
    createDatabase create For an embedded database if the location does not already exist.
    webSphereDefaultIsolationLevel 2 (for READ_COMMITTED) Set this property to avoid database access problems (see the technote Changing the default isolation level for non-CMP applications and describing how to do so using a new custom property webSphereDefaultIsolationLevel).
  10. Click Save to save the changes directly to the master configuration.