6 - Creating the Data Sources

To save information to the RPM repository, when using the RPM Web Services API, the data source information or DSN (Data Source Name) must be set correctly. The information specified in the DSN allows the RPM Web Service to connect to the RPM repository database.

When you have several hosts or databases you can run batch scripts to work with each of them by specifying correctly the DSN you want to connect to.

The information required for the data source setting is the following:

This information will be used when the client logs into the server.

A datasource must be created: jdbc/RPMDATASOURCE

To create the RPM database Data Source

  1. From the WebSphere Administrative Console window, go to Resources then to JDBC Providers.
  2. Select the newly created JDBC provider: DB2 Universal JDBC Driver Provider.
  3. Make sure that All Scopes is selected from the dropdown list, as per the screenshot below.
  4. Click Data sources (not Data sources (version 4) then New to create the jdbc/RPMDATASOURCE data source using the following values.
    Note: When connecting to the server that specifies the data source, it should read: jdbc/RPMDATASOURCE.
    • Data source name: RPMDATASOURCE
    • JNDI name: jdbc/RPMDATASOURCE
  5. Click Next


  6. Fill in the following fields:
    • Database name: Name of the DB2 instance that will be used. Case sensitive.
    • Driver type : 4
    • Server name : Name or IP address of the physical machine that is hosting the database.
    • Port number: Usually 50000 but should be what the DB admin has chosen.
    • Check Use this data source in container managed persistence (CMP)
  7. Click Next then Finish.
  8. Click OK and save changes to the master configuration file.