Using MOM

Tutorial: Write Usage Governance data to a MOM system

Usage Governance data can be written to a WebSphere MQ queue or an Software AG EntireX server.

It is outside the scope of this tutorial to detail exactly how these are set up so it is assumed that the chosen Messaging system is configured correctly.

In this tutorial we will be using 2 SOA Gateway servers. One will direct usage governance data collected to a message queue and the other will read from this queue and process the input. The end result is that the target of the usage governance web service will receive an add request complete with the data.

  1. In the Control Centre select the server for which usage governance data will be generated.

  2. Select the Governance tab in the Properties view.

    To turn data collection on the Information box must be selected. If required Input Data and Output Data may also be selected.

  3. The Messaging section allows one to enter the details required for None, MQ or EntireX :

    Select the radio button of MQ or EntireX and fill in as appropriate for you MOM installation. Note that the queue will be opened for output and later on in this tutorial will be opened as an input queue.

    graphics/usgov_global.png

  4. Select the Save button.

  5. Stop the server. See here on how to do this.

  6. Start the server.

  7. At this point SOA Gateway should have connected successfully to the manager and opened the output queue specified. Check the error log for any errors at this point.

    The default location of the Apache error_log is [SERVER_INST]/Apache22/logs/error_log replacing [SERVER_INST] with the location in which you have installed SOA Gateway.

  8. Issue a request to SOA Gateway e.g. a get request

  9. An add request, containing usage governance data pertaining to this request, should appear as an entry in the output queue.

    Use a search mechanism particular to your messaging system to check that this is the case. Note the syntax of this request is supported by the usage governance web service. If the latter has not yet been created, follow the steps outlined here to do so.

  10. In the Control Centre, select the second SOA Gateway server. Open the Messaging tab in the Properties view for the usagegovernance web service:

    graphics/usgov_mom_etb.png

  11. Fill in the details for the messaging system you are using. Clearly, for MQ, the Input Q value has to be the value specified for Queue in step 3. For EntireX the details entered here should match those from 3.

    Note:
    The Broker Stub value will depend on the system from which EntireX is being called i.e. broker32.dll for Windows, broker.so for Linux etc.

  12. As per the hint, switch back to Service properties and select the Save button when complete.

  13. SOA Gateway will now make contact with the appropriate messaging system. Check the error log for messages.

    The default location of the Apache error_log is [SERVER_INST]/Apache22/logs/error_log replacing [SERVER_INST] with the location in which you have installed SOA Gateway.

  14. As soon as successful connections have been made, the input queue/service will be read and the message(s) processed.

    There are a couple of ways to check the status of this.

    • Query the database table directly..

    • Issue a list request on the usage governance web service.

    • Check the Output Q (MQ) or the EntireX server for responses to the add request to the usage governance web service.