Exercise 1.2: Creating a server and server configuration for JMS

Before you begin, you must complete Exercise 1.1: Importing the required resources and building the required projects.

To create a JMS server:

  1. From the File menu, select New > Other > Server > Server > Next.
  2. Select WebSphere v6.0 Server as the server type. Click Next.
  3. Accept the default server port and name. Click Next.
  4. Select the JMSEAR from the list of available projects and click Add to target it to the server. Click Finish.
  5. Wait for the server to start. once it has started the console will display Server server1 open for e-business;

Configuring the server to work with JMS

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

  1. Once you have launched the console, select Servers > Application Servers to ensure that the server you created is listed.
  2. In the left-hand pane, expand Service Integration > Buses and click New. Enter a unique name in the Name field (for example WS_tutorial_bus) and click OK.
  3. To associate the current server with the newly created integration bus, select the name of the bus you have just created, under Additional Properties click Bus members. Click Add and select the server you want to associate the integration bus and then click Next. Click Finish to confirm and click Save to save the changes.
  4. 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_tutorial_queueJms. Click Next.
    4. Accept the default bus member. Click Next.
    5. Click Finish to confirm your changes, and then save your changes.
  5. Assign JMS settings against the newly created queue:
    1. In the left-hand navigation panel, 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_tutorial_queueJms) and JNDI name (for example jms/ws_tutorial_queue). In the connection pane, select the bus (WS_tutorial_bus) and Queue (ws_tutorial_queueJms) you created earlier.
    4. Click OK and save the changes.
  6. Create a queue connection factory for the input queue:
    1. Go to Resources > JMS Providers > Default Messaging.
    2. Under Connection Factories select JMS queue connection factory, click New and enter a name (for example WebServicesInput_QCF) and a JNDI name (for example jms/ws_tutorial_qcf ).
    3. Select the bus created earlier (WS_tutorial_Bus) as the bus name.
    4. Click OK and save the changes.
  7. 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_tutorial_Bus) as the bus name and click OK and save the changes.
  8. 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_tutorial_JMSRouter), enter a JNDI name (for example eis/ws_tutorial_JMSRouter), select Queue as the destination type, enter the destination JNDI name (jms/ws_tutorial_queue), and select the bus name (WS_tutorial_Bus).
    3. Click OK and save the changes.
  9. 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.

Now you are ready to begin Exercise 1.3: Creating the Web service.

Feedback
(C) Copyright IBM Corporation 2000, 2004. All Rights Reserved.