Creating a JMS server

In order to create a Web service that uses JMS transports, you need to first create and configure a server that can support JMS.

In order to create a server, you must have installed at least one of WebSphere® Application Server v6.0 or the WebSphere Application Server legacy test environments. JMS Web services are only supported on WebSphere Application Server version 5.0 and later.

Parent topic: HTTP and JMS transport methods

Create a server and server configuration for SOAP over JMS using WebSphere Application Server v5.x

In order to complete the steps in this section you must have WebSphere Application Server v5.x or the legacy test environments installed.
  1. Select File > New > Other > Sever > Sever and Server Configuration > Next.
  2. Enter a name for the server, and ensure that the server type is WebSphere version 5.x or WebSphere version 5.1 Test Environment. Click Finish.
  3. In the J2EE Hierarchy view of the J2EE perspective, from the Window menu select View > Other >Servers This will open the server view and your server should be listed.
  4. Double-click the server you have created. This will open its server configuration file in an editor.
  5. Select the JMS tab.
    1. Under Server Settings, add as many queue names as required by clicking Add. Note that if the changes are made under Cell or Node Settings, the Web services tools will not pick them up
    2. For JMS Provider select MQ Simulator for Java™ Developers.
    3. Under JMS Connection Factories, add topic or queue connections as appropriate. If you select to use queues, you must add inbound and outbound queue connection factories. The outbound queue connection factory must have the following:
      • Name: WebServicesReplyQCF
      • JNDI Name: jms/WebServicesReplyQCF
      This name is case-sensitive, and no other name can be used.
    4. Under JMS Destinations, add queues that have the same names as those created in step 2a. This queue will be used as an inbound queue to process request messages.
  6. Select the EJB tab.
    1. Under Listener Ports, click Add to add a port for each queue you have created.
    2. Name the port, select a connection factory, which cannot be jms/WebServicesReplyQCF , and select the destination JNDI name for a queue associated with the connection factory.
  7. If you are using the WebSphere version 5.1 Test Environment, skip this step and go to step 8. If you are using WebSphere version 5.0, select the Environment tab.
    1. Expand Class Path.
    2. Click Add External JARs.
    3. Browse to the following JAR file: WS_installdir\runtimes\base_v5\lib\urlprotocols.jar
  8. Close the server configuration and save your settings when prompted.

Create a server and service integration bus for SOAP over JMS using WebSphere Application Server v6.0

The following steps will guide you through basic service integration bus and JMS queue creation using the default messaging provider included with WebSphere Application server. Service integration technologies replaced the embedded messaging provider used in previous versions of the product. These instructions are not a definitive guide to how to use Web services with service integration technologies, however they can be used as a guide when setting up topics and queues to handle JMS messages.

For additional information about the default messaging provider, including more detailed information on JMS and why and how to set up queues and topics for JMS, refer to the WebSphere Application Server infocenter and search for "messaging resources." For additional information on using service integration technologies with Web services, refer to the WebSphere Application Server infocenter and search for "Enabling Web services through service integration technologies."

  1. Select File > New > Other > Sever > Sever > Next.
  2. Enter a name for the server, and ensure that the server type is WebSphere version 6.0. Click Finish.
  3. In the J2EE Hierarchy view of the J2EE perspective, from the Window menu select View > Other >Servers This will open the server view and your server should be listed.
  4. JMS settings for this server must be set in the WebSphere Application Server administrative console. The console can be launched through the Start menu on Windows, or through a Web browser at: http://localhost:9060/ibm/console
  5. Once you have launched the console, select Servers > Application Servers to ensure that the server you created is listed.
  6. In the left-hand pane, expand Service Integration > Buses > New. Enter a unique name in the Name field (for example WS_test_Bus) and click OK.
  7. To associate the current server with the newly created integration bus, click Bus members under Additional Properties. Click Add and select the server you want to associate the integration bus. Click Finish and save the changes.
  8. Create a physical queue for the request message:
    1. In the left-hand pane, expand Service Integration > Buses. Select the bus created earlier.
    2. Under Additional Properties click Destinations.
    3. Click on New and choose Queue as the destination type. Enter an identifier such as ws_test_queueJms. Accept the default Bus member. Click Next.
    4. Save your changes.
  9. Assign JMS settings against the newly created queue:
    1. Go to Resources > JMS Providers > Default Messaging.
    2. Under Destinations, click JMS Queue, and then click on New.
    3. Enter a name (for example ws_test_queueJms) and JNDI name (for example jms/ws_test_queue). In the connection pane, select the Bus (WS_test_Bus) and Queue (ws_test_queueJms) you created earlier.
    4. Click OK and save the changes.
  10. Create a queue connection factory for the input queue:
    1. Go to Resources > JMS Providers > Default Messaging.
    2. Under JMS queue connection factory, click New and enter a name (for example WebServicesInput_QCF) and a JNDI name (for example jms/ws_test_qcf ).
    3. Select the bus created earlier (WS_test_Bus) as the bus name and click OK and save the changes.
  11. Create a queue connection factory for the reply queue:
    1. Go to Resources > JMS Providers > Default Messaging.
    2. Under JMS queue connection factory, click New and enter a name (for example WebServicesReply_QCF) and a JNDI name (for example jms/WebServicesReplyQCF).
    3. Select the bus created earlier (WS_test_Bus) as the bus name and click OK and save the changes.
  12. A JMS activation specification is needed to bind the input queue and the listening message driven EJB:
    1. Go to Resources > JMS Providers > Default Messaging.
    2. Under Activation specifications, click JMS activation specification, click New, and enter a name (for example ws_test_JMSRouter), enter a JNDI name (for example eis/ws_test_JMSRouter), select Queue as the destination type, enter a destination JNDI name (for example jms/ws_test_queue), and enter the bus name (WS_test_Bus).
    3. Click OK and save the changes.
  13. Once you have added the required connection factories and queues or topics, you can stop and restart WebSphere Application Server v6, and return to the Rational® Developer product's workspace.
Terms of use | Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.