Configuring a JDBC Providers policy for the scenario to enrich a message with data from a database

Configure a JDBC Providers policy and deploy the default policy project.

Before you begin

The integration server named Server1 is created and started.

About this task

The IBM® App Connect Enterprise Toolkit connects to the database CLIENTS and runs discovery so that the graphical data mapping editor can use the database definition to visualize the database tables PERSON, ADDRESS, and PHONE.

At run time, the Mapping node uses a JDBC Providers policy to obtain the configuration parameters that will enable it to make the connection to the runtime database PCLIENTS that the message map will execute against.

You configure the runtime database resources by defining the JDBC Providers policy properties. You must set the following properties:
  • databaseName property: You must set its value to be the runtime database name PCLIENTS.
  • databaseSchemaNames property: You must set its value to use at run time the database schema PADDRESSBOOK.
Note: The table names must be the same in the database development environment and in the run time database environment.

The following table lists the database resource names in the development environment, and in the runtime environment:

Table 1. Scenario database resource names
  Development database resource names Runtime database resource names
Database name CLIENTS PCLIENTS
Schema name ADDRESSBOOK PADDRESSBOOK
Tables names PERSON, ADDRESS, PHONE PERSON, ADDRESS, PHONE

Procedure

To configure the JDBC Providers policy, complete the following steps:

  1. Configure the default policy project for your integration server, as described in Configuring a default policy project.
  2. Create a policy project with the configured default policy project name.
    For information about creating a policy project, see Creating policies with the IBM App Connect Enterprise Toolkit.
  3. Configure a JDBC Providers policy in the default policy project, with a name that matches the map datasource name (in this scenario, CLIENTS).
  4. Set the properties for the JDBC Providers policy, as described in JDBC Providers Policy (JDBCProviders).
  5. Deploy the default policy project by using one of the following methods:
    • Add the policy project to a BAR file and deploy it to the integration server.
    • Put the policy project in the overrides directory for the integration server.

Results

A JDBC provider configurable service is available at run time.

What to do next

Secure the JDBC connection. For more information, see Securing the JDBC Providers policy for the scenario to enrich a message with data from a database.