+

Search Tips   |   Advanced Search

Configure WebSphere Application Server for DB2 manually

To manually set up and configure the DB2 database with WebSphere Application Server, use the following procedure.

Complete the DB2 database Setup procedure before continuing.

  1. Add the DB2 JDBC driver JAR file to was_install_dir/optionalLibraries/IBM/mfp_server/jdbc_driver/db2.

    If that directory does not exist, create it. We can retrieve the file in one of two ways:

  2. Set up the JDBC provider:

    1. In the WebSphere Application Server console, click Resources > JDBC > JDBC Providers > New.

    2. Set the scope of the JDBC connection to Node level.

    3. Set Database type to DB2.

    4. Set Provider type to DB2 Using IBM JCC Driver.

    5. Set Implementation Type to Connection pool data source.

    6. Set Name to DB2 Using IBM JCC Driver.

    7. Click Next.

    8. Set the class path to the set of JAR files in the directory was_install_dir/optionalLibraries/IBM/mfp_server/jdbc_driver/db2, one per line.

    9. Do not set Native library path.

    10. Click Next.

    11. Click Finish.

    12. The JDBC provider is created.

    13. Click Save.

  3. Create a data source for the runtime database:

    1. Select the new JDBC provider and click Data Source.

    2. Click New to create a data source.

    3. Set the Data source name to Worklight Database.

    4. Set JNDI Name to jdbc/WorklightDS.

    5. Click Next.

    6. Enter properties for the data source: For example, Driver type: 4, Database Name: WRKLGHT, Server name: localhost, Port number: 50000 (default). Leave "Use this data source in (CMP)" checked;

    7. Click Next.

    8. Create JAAS-J2C authentication data, specifying the DB2 user name and password for Container Connection.

    9. Select the component-managed authentication alias created.

    10. Click Next and Finish.

    11. Click Save.

    12. In Resources > JDBC > Data sources, select the new data source.

    13. Click WebSphere Application Server data source properties.

    14. Select the Non-transactional data source check box.

    15. Click OK.

    16. Click Save.

    17. Click Custom properties for the data source, select property currentSchema, and set the value to the schema used to create the data source tables (WRKSCHM and WLRESCHM in this example).

  4. Create a data source for the reports database:

    1. Select the new JDBC provider and click Data Source.

    2. Click New to create a data source.

    3. Set the Data source name to Worklight Reports Database.

    4. Set JNDI Name to jdbc/WorklightReportsDS.

    5. Click Next.

    6. Select the component-managed authentication alias created.

    7. Click Next and Finish.

    8. Click Save.

    9. In Resources > JDBC > Data sources, select the new data source.

    10. Click WebSphere Application Server data source properties.

    11. Select the Non-transactional data source check box.

    12. Click OK.

    13. Click Save.

    14. Click Custom properties for the data source, select property currentSchema, and set the value to the schema used to create the data source tables (WRKSCHM and WLRESCHM in this example).

  5. Test the data source connection by selecting each Data Source and clicking Test Connection.


Parent topic: Configure the DB2 databases manually