Setting up your environment

This section describes how to prepare your environment to work with the tutorial. In what follows, sample_folder refers to the folder in which the samples reside. The business object repository is provided in the sample_folder as .xsd files.

  1. Define the queues The tutorial requires that six queues be defined in your queue manager. To create the necessary queues, type RUNMQSC crossworlds.queue.manager from the command line and issue the following commands:
    • DEFINE QL('MQCONN.IN')
    • DEFINE QL('MQCONN.IN_PROGRESS')
    • DEFINE QL('MQCONN.ERROR')
    • DEFINE QL('MQCONN.ARCHIVE')
    • DEFINE QL('MQCONN.REPLY')
    • DEFINE QL('LEGACYAPP.IN')
    Now you can define the queues required by the WebSphere MQ adapter and Port Connector for the WMQI broker configuration as follows:
    • DEFINE QL('WebSphereMQConnector/ADMININQUEUE')
    • DEFINE QL('WebSphereMQConnector/ADMINOUTQUEUE')
    • DEFINE QL('WebSphereMQConnector/DELIVERYQUEUE')
    • DEFINE QL('WebSphereMQConnector/FAULTQUEUE')
    • DEFINE QL('WebSphereMQConnector/REQUESTQUEUE')
    • DEFINE QL('WebSphereMQConnector/RESPONSEQUEUE')
    • DEFINE QL('WebSphereMQConnector/SYNCHRONOUSREQUESTQUEUE')
    • DEFINE QL('WebSphereMQConnectorSYNCHRONOUSRESPONSEQUEUE')
    • DEFINE QL('PortConnector/ADMININQUEUE')
    • DEFINE QL('PortConnector/ADMINOUTQUEUE')
    • DEFINE QL('PortConnector/DELIVERYQUEUE')
    • DEFINE QL('PortConnector/FAULTQUEUE')
    • DEFINE QL('PortConnector/REQUESTQUEUE')
    • DEFINE QL('PortConnector/RESPONSEQUEUE')
    • DEFINE QL('PortConnector/SYNCHRONOUSREQUESTQUEUE')
    • DEFINE QL('PortConnector/SYNCHRONOUSRESPONSEQUEUE')
  2. Configure the adapter Using Connector Configurator, open sample_folder\WebSphereMQConnector.cfg. For further information on using Connector Configurator, see Appendix B. Connector Configurator; for more on connector-specific properties, see Connector-specific properties.

    If you have not done so already, configure the adapter as described in the installation guide for your system. Additionally, check or change adapter configuration properties to match the values listed below:
    • Broker Type Set this property to WMQI.
    • Repository Directory Set this property to the sample_folder directory.
    Set the following connector-specific properties:
    • ConfigurationMetaObject Set this property to Sample_WebSphereMQ_MO_Config.
    • DataHandlerConfigMO Set this property to Sample_WebSphereMQ_MO_DataHandler.
    • DataHandlerMimeType Set this property to text/delimited.
    • DataHandlerClassName Set this property to com.crossworlds.DataHandlers.text.delimited
    • ErrorQueue Set this property to queue://crossworlds.queue.manager/MQCONN.ERROR.
    • InProgressQueue Set this property to queue://crossworlds.queue.manager/MQCONN.IN_PROGRESS.
    • InputQueue Set this property to queue://crossworlds.queue.manager/MQCONN.IN.
    • hostname Set this property to the name of your machine.
    • port Set this property to 1414.
    • channel Set this property to CHANNEL1
    • UnsubscribedQueue Set this property to queue://crossworlds.queue.manager/MQCONN.UNSUBSCRIBED.
  3. Configure the Port Connector Using Connector Configurator, set the following standard properties:
    • Broker Type Set this property to WMQI.
    • Repository Directory Set this property to the sample_folder directory.
    • RequestQueue Set this property to WebSphereMQConnector/DELIVERYQUEUE (the DeliveryQueue property value for the WebSphere MQ adapter).
    • DeliveryQueue Set this property to WebSphereMQConnector/REQUESTQUEUE (the RequestQueue property value for the WebSphere MQ adapter).
  4. Support business objects In order to use business objects, adapters must first support them. Using Connector Configurator, click the Supported Business Objects tab for the WebSphere MQ adapter, add the business objects shown in Table 10 and set the Message Set ID to a unique value for each supported business object.
    Table 10. Supported sample business objects for JMS adapter
    Business object name Message Set ID
    Sample_WebSphereMQ_MO_Config 1
    Sample_WebSphereMQ_MO_DataHandler 2
    Sample_WebSphereMQ_LegacyContact 3
    Using Connector Configurator, open the Port connector definition PortConnector.cfg provided in the sample_folder, and add the supported business object and Message Set ID shown in Table 11.
    Table 11. Supported sample business objects for Port connector
    Business object name Message Set ID
    Sample_WebSphereMQ_LegacyContact 1
  5. Configure the meta-object If your WebSphere MQ Queue Manager is not named crossworlds.queue.manager, update the URI in the default attribute's AppSpecificInfo field in the Sample_WebSphereMQ_MO_Config business object.
  6. Create or update connector start scripts

    Windows:
    1. Open the properties of the shortcut for the adapter for WebSphere MQ.
    2. As the last argument in the target, add -c followed by the <full path and filename for the WebSphereMQConnector.cfg file> For example:
      -cProduct_Dir\connectors\WebSphereMQ\samples\
      LegacyContact\WebSphereMQConnector.cfg
    UNIX:
    1. Open the file: Product_Dir/bin/connector_manager_WebSphereMQ.
    2. Set the value of the AGENTCONFIG_FILE property to -c followed by the <full path and filename for the WebSphereMQConnector.cfg file> For example:
      AGENTCONFIG_FILE=-cProduct_Dir/connectors/WebSphereMQ/samples/
      LegacyContact/WebSphereMQConnector.cfg

Copyright IBM Corporation 1997, 2004. All Rights Reserved.