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, 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.1 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
- Select File > New > Other > Sever > Sever and Server Configuration > Next.
- 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.
- 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.
- Double-click the server you have created. This will open its server configuration file in an editor.
- Select the JMS tab.
- 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
- For JMS Provider select MQ Simulator for Java Developers.
- Under JMS Connection Factories, add topic or queue connections as appropriate. If you select to use queues, 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.
- 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.
- Select the EJB tab.
- Under Listener Ports, click Add to add a port for each queue you have created.
- 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.
- If you are using the WebSphere version 5.1 Test Environment, skip this step and go to step 7. If you are using WebSphere version 5.0, select the Environment tab.
- Expand Class Path.
- Click Add External JARs.
- Browse to the following JAR file: WS_installdir\runtimes\base_v5\lib\urlprotocols.jar
- Close the server configuration and save your settings when prompted.
Create a server and server configuration for SOAP over JMS using WebSphere Application Server v6.0
- Select File > New > Other > Sever > Sever > Next.
- Enter a name for the server, and ensure that the server type is WebSphere version 6.0. Click Finish.
- 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.
- JMS settings for this server must be set in the WebSphere Application Server administrative console. Once you have launched the console, select Servers > Application Servers to ensure that the server you created is listed.
- In the left-hand pane, expand Resources > JMS Providers > WebSphere MQ.
- On the configuration page, select the name of the server you created as your scope, and click Apply.
- Under Additional Properties, select either WebSphere MQ queue connection factories or WebSphere MQ topic connection factories depending on whether you want to use queues or topics. Refer to the WebSphere Application Server online help for more information on your JMS selections.
- Click Add.
- Enter the name and JNDI name for your inbound connection factory and click OK.
- Click Add.
- Enter the name and JNDI name for your outbound connection factory and click OK. For Web services created with Rational Development products, the outbound queue connection factory must be called WebServicesReplyQCF and have the JNDI name jms/WebServicesReplyQCF. Click OK.
- You will be prompted to save your changes to the configuration. Click Save.
- Return to the main JMS window by clicking the WebSphere MQ JMS Provider link at the top of the page.
- Select WebSphere MQ queue destinations or WebSphere MQ topic destinations depending on whether you have chosen to use queues or topics.
- Click Add.
- Enter the queue or topic name, the JNDI name, and the base queue or topic name. Under the Queue or Topic Connection Properties, enter all required information. Click OK.
- You will be prompted to save your changes to the configuration. Click Save.
- Return to the main JMS window by clicking the WebSphere MQ JMS Provider link at the top of the page.
- 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 products' workspace.