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 DNS 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:
- The database host.
- The database name.
- The user name and password for this database.
This information will be used when the client logs into the server and
when a session is started.
The following two datasources must be create two: jdbc/RPMDATASOURCE and jdbc/RPMSESSION
In addition, you also need to place the cloudscape-v10-helper.jar in
the lib/ext directory of your Websphere installation.
This jar can be found in the rpm-web-services.ear. Extract
the EAR file with a Zip file extractor, this should extract the file rpm-web-services.war,
then also extract the WAR file with a Zip file extractor. The file is located
in the folder /WEB-INF/lib/cloudscape-v10-helper.jar.
To create the RPM database Data Source
- From the WebSphere Administrative Console window, go to Resources then
to JDBC Providers.
- Select the newly created: DB2 Universal JDBC Driver Provider.
- 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.
- Name: RPMDATASOURCE
- JNDI name: jdbc/RPMDATASOURCE
- Use this Data Source in CMP: checked
- Select a data store helper class: selected
- Data store helper classes provided by WebSphere Application Server: Select
the DB2 Universal data store helper.
- Component-managed authentication alias: the alias you have created
(servadm)
- 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.
- Click OK and save changes to the master configuration file.
To create the RPMSESSION Data Source
- From the WebSphere Administrative Console window, go to Resources then
to JDBC Providers.
- Select the Cloudscape v10 JDBC Provider.
- Click Data sources (not Data sources (version 4)) then New to
create the jdbc/RPMSESSION data source using the following values:
- Name : RPMSESSION
- JNDI name : jdbc/RPMSESSION
- Use this Data Source in CMP: checked
- Select: Specify a user-defined data store helper
- Enter a package-qualified data store helper class name: com.ibm.rpm.CloudscapeV10DataStoreHelper
((this class comes from the previously extracted CloudscapeV10Helper.jar)
- Component-managed authentication alias: the session alias you have
created (RPMSESSION)
- Click OK and save the changes to the master configuration.
- Click on the newly created RPMSESSION data source on Custom Properties.
- Click New to add a new property:
- Click OK and save changes to the master configuration.