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.

  1. Create the queues The tutorial requires that six queues be defined with your JMS service provider. Check your JMS provider documentation before defining these queues. Define the following queues (or make them available via JNDI lookup):
    • CWLD_Input
    • CWLD_InProgress
    • CWLD_Error
    • CWLD_Archive
    • CWLD_Unsubscribed
    • CWLD_Output
  2. Create and start a WebSphere MQ queue manager with a running channel initiator and listener.
  3. Define the queues required by the WebSphere MQ adapter and Port Connector for the WMQI broker configuration as follows:
    • DEFINE QL('JMSConnector/ADMININQUEUE')
    • DEFINE QL('JMSConnector/ADMINOUTQUEUE')
    • DEFINE QL('JMSConnector/DELIVERYQUEUE')
    • DEFINE QL('JMSConnector/FAULTQUEUE')
    • DEFINE QL('JMSConnector/REQUESTQUEUE')
    • DEFINE QL('JMSConnector/RESPONSEQUEUE')
    • DEFINE QL('JMSConnector/SYNCHRONOUSREQUESTQUEUE')
    • DEFINE QL('JMSConnector/SYNCHRONOUSRESPONSEQUEUE')
    • 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')
  4. Configure the adapter Using Connector Configurator, open sample_folder\JMSConnector.cfg. For further information on using Connector Configurator, see Appendix B. Connector Configurator; for more on connector-specific properties, see Configuring connector-specific properties.
    Set the following standard properties:
    • Broker Type Set this property to WMQI.
    • Repository Directory Set this property to the sample_folder directory.
    Set the following connector-specific properties:
    • DuplicateEventElimination Set this property to true.
    • MonitorQueue Set this property to JMSConnector/MONITORQUEUE
    • ConfigurationMetaObject Set this property to Sample_JMS_MO_Config.
    • DataHandlerConfigMO Set this property to Sample_JMS_MO_DataHandler.
    • DataHandlerMimeType Set this property to text/delimited.
    • ErrorQueue Set this property to CWLD_Error.
    • InputQueue Set this property to CWLD_Input.
    • UnsubscribedQueue Set this property to CWLD_Unsubscribed.
  5. 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 JMSConnector/DELIVERYQUEUE (the DeliveryQueue property value for the JMS adapter).
    • DeliveryQueue Set this property to JMSConnector/REQUESTQUEUE (the RequestQueue property value for the JMS adapter).
  6. 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 JMS adapter, add the business objects shown in Table 19 and set the Message Set ID to a unique value for each supported business object.
    Table 19. Supported sample business objects for JMS adapter
    Business Object Name Message Set ID
    Sample_JMS_MO_Config 1
    Sample_JMS_MO_DataHandler 2
    Sample_JMS_Contact 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 20.
    Table 20. Supported sample business objects for Port connector
    Business Object Name Message Set ID
    Sample_JMS_Contact 1
  7. Create or update connector start scripts

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

Copyright IBM Corporation 1997, 2004. All Rights Reserved.