Running the WBI JDBC Adapter Migration sample

You can run the Adapter and MigratedAdapter message flows to perform the following processes:

If you encounter any problems when you run the sample, see Resolving problems when running samples in the IBM Integration Bus documentation.

To run the Adapter message flow:

  1. Ensure that the sample message flows and message set are deployed. Locate the AdapterMigration.bar file in the workspace and deploy it to the AdapterMigration integration server.
    When you import the sample, a number of warnings might be issued relating to .msgflow files. These warnings are database related and do not affect the running of the sample.
  2. In the Integration Development perspective, expand the AdapterMigration sample project and, under Flow Tests, double-click the file Adapter Address Message.mbtest to open it in the Test Client.
  3. Click Send Message to place a WebSphere MQ message on the input queue of the Adapter message flow.
  4. View the contents of the message that is retrieved and verify that it is a simple XML file with an ADAPTERADDRESS entry.

Repeat with the other .mbtest files as desired.

Run the MigratedAdapter message flow to reproduce the output by modifying database values directly:

  1. In the Data perspective, expand the AdapterMigration Data Design project and, under SQL Scripts, right-click adapter_insert_all.sql, and select Run SQL.
  2. Select an existing JDBC connection for database "DBINPUT", or create a new one, following the on-screen instructions. If you are using an existing connection, ensure you use Edit to set a valid username and password for the connection on the Driver Properties tab.
  3. Click Finish to add a new row to the address, customer and invoice tables. The result is displayed in the SQL Result view, which can be opened by using the Show View Eclipse menu.
  4. Switch to the Integration Development perspective, expand the AdapterMigration sample project and double-click MigratedAdapter.mbtest.
  5. Click Get Message on the three Dequeue elements to read a message from the ADAPTERMIGRATION.INVOICE, ADAPTERMIGRATION.CUSTOMER, and ADAPTERMIGRATION.ADDRESS queues.
  6. Verify that the message that is retrieved contains a customer structure. If no message is received, open the DatabaseInput Retrieve Failure.mbtest Flow Test to dequeue a possible failure explanation message.

If you want to re-run the AdapterMigration flow, you must modify the SQL file to add a different row to avoid violating table constraints:

  1. In the Data perspective, expand the AdapterMigration Data Design project and, under SQL Scripts, right-click adapter_insert_all.sql and select Open With and SQL File Editor.
  2. Modify some of the VALUES parameters.
  3. Save the changes and re-run the sample following the steps in the previous section.

Back to sample home