How to Run the Message-Driven Bean (MDB) Samples with WebSphere MQ rather than the Embedded JMS Provider in WebSphere Application Server V5.0
 Technote (troubleshooting)
 
Problem(Abstract)
By default, the MDBSamples application that comes with WebSphere® Application Server V5.0 is configured to run with the Embedded JMS Provider. However, if the full WebSphere MQ® 5.3 is installed, the samples can be configured to run with the full WebSphere MQ product.
 
Resolving the problem
Note: These instructions assume that MDBSamples is already functioning with the Embedded JMS Provider. If Embedded JMS is not installed, the instructions are essentially the same, but the Listener Port (SamplePtoPListenerPort) will need to be created with the Connection Factory set to Sample/JMS/QCF and the Destination set to Sample/JMS/Q1, and there will be no JMS resources to delete.

To run the point-to-point MDBSamples with the full WebSphere MQ, follow these instructions:

  1. In the WebSphere Administrative Console, select the WebSphere JMS Provider and set the Scope to "Server". Delete these resources:
    SampleJMSQueueConnectionFactory
    Sample.JMS.Q1
    Sample.JMS.Q2

  2. Select the WebSphere MQ JMS Provider and define the following resources:
    • WebSphere MQ Queue Connection Factory:
      Name = SampleJMSQueueConnectionFactory
      JNDI Name = Sample/JMS/QCF
      Queue Manager =
      Queue_Manager_name
      Host =
      Queue_Manager_hostname
      Port =
      Queue_Manager_Listener_Port_Number 
      Channel = Channel_name (for remote queue managers)
      Transport Type = CLIENT

      To find the queue manager listener port number on Windows:
      • If the listener port already exists:
        1. Go to MQ Services,
        2. Select the Queue_Manager,
        3. Right click on its Listener and select Properties
        4. Select the Parameters tab to find the Listener port number.
      • If the listener port does not already exist:
        1. Go to MQ Services,
        2. Select the Queue_Manager,
        3. Right click on it and select New > Listener , then
        4. Enter a port number on the Parameters tab
    • WebSphere MQ Queue Destinations:
      Name = Sample.JMS.Q1
      JNDI Name = Sample/JMS/Q1
      Base Queue Name = Q1

      Name = Sample.JMS.Q2
      JNDI Name = Sample/JMS/Q2
      Base Queue Name = Q2

  3. Create a new queue manager. On Windows, go to MQ Explorer to create the Queue Manager. You can also use an existing queue manager. Do not use the Embedded JMS queue manager (WAS_node_server1). Then do the following:
    • Create local queue Q1,
    • Create local queue Q2,
    • Go to MQ Services, and restart the Queue Manager and the corresponding Listener

  4. Restart WebSphere Application Server

  5. Run the clientConfig tool (in the install_root\bin directory) to modify the MDBSamples.ear client configuration:
    1. Start clientConfig tool,
    2. Open MDBSamples.ear in the install_root\samples\lib\MessageDrivenBeans directory,
    3. Select WebSphere JMS Provider,
    4. Delete ConnectionFactory,
    5. Select MQ JMS Provider,
    6. Recreate ConnectionFactory.
      Note: Use "jms/ConnectionFactory" for the JNDI Name.
    7. Select "CLIENT" for Transport Type and specify the Queue Manager, Host, and Port for WebSphere MQ.
    8. Save changes and exit.

  6. Run the point-to-point MDBSamples per the instructions in the Samples Gallery. The Samples Gallery can be accessed by opening a Web browser and entering:http://localhost:9080/WSsamples/en/index.html (substituting the host name of the WebSphere machine for localhost if accessing remotely).
 
 
Cross Reference information
Segment Product Component Platform Version Edition
Application Servers Runtimes for Java Technology Java SDK
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > Java Message Service (JMS)
Operating system(s): Windows
Software version: 5.1.1.8
Software edition:
Reference #: 1108871
IBM Group: Software Group
Modified date: Dec 15, 2005