Hub Request

The Hub Request interaction pattern synchronously delivers a message from WebSphere Application Server to the adapter and receives a reply.

The Enterprise Application Archive application for the interaction pattern must contain a service project. If you chose Export to Service Project when you deployed your System Manager user project, the service project already exists. If you exported the System Manager user project as a JAR file or as a set of files to a directory, you will need to import the files to create a service project. If you need to perform that task, seeImport files for a new service project, which describes that procedure for the Agent Delivery interaction pattern. The remainder of these instructions for the Hub Request interaction pattern assume that you chose Export to Service Project when you deployed your System Manager user project.

To create a Hub Request interaction pattern, create an Enterprise Application Archive application that contains:

These tasks are described in the topics that follow.

Creating the EJB project

This step creates a Session Bean, along with the .wsdl files describing it as an EJB service and bindings.

  1. In the Package Explorer view, select the JMSServices .wsdl file. (Note that because the service project is identical for all four interaction patterns, this can be the same JMSServices file generated when you created the service project for the Agent Delivery interaction pattern.)
  2. Right-click the file and choose Enterprise Services>Generate Deploy Code. The Generate Deploy Code dialog displays.

  3. In the Port Name drop-down, select the port name for this interaction pattern.
  4. Select Create a new port and binding.

  5. In the Inbound binding type drop-down, select EJB, JMS, or SOAP. Your selection affects the WSDL files generated, for the EJB access you get the EJB Bindings and Service files.
  6. Choose Next. The Inbound Service Files dialog appears.
  7. In the Inbound Service Files dialog, edit as necessary and specify a meaningful package name for both the port name and the binding name.
  8. Choose Next if you need to change the JNDI lookup name, or choose Finish.
  9. Use the Deployment Descriptor editor to map queue names and queue connection factory names, in the same manner as you did for the Hub One Way interaction pattern. But for the Hub Request interaction pattern to execute correctly, the sending and receiving of the message must not be part of the same transaction. The simple solution is to disable transactions on the EJB in its deployment descriptor:

  10. An EJB that represents Hub Request is completed. You can deploy it or use it as any other WebSphere Application Server component.

Optionally, after completing the above steps, you can create an application client project for testing. See the steps describing this task for the Hub One Way interaction pattern.

Copyright IBM Corp. 1997, 2004