The Hub Request interaction pattern synchronously delivers a message from
WebSphere Application Server to the adapter and receives a reply.
The EAR 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 EAR application that
contains:
- The Session Bean that invokes the JMS service and can be used from any
J2EE application. The Session Bean has a business method for each
operation of the deployed (JMS) Port Type.
After creating the Session Bean, you must configure it, using the
Deployment Descriptor editor, to perform necessary WebSphere mappings between
JNDI names and the queue names and connection factory names derived from the
.wsdl file.
- Helper classes that represent the .xsd files as java beans, and
format handler java beans that convert XML to java, as specified in the
.wsdl file.
These tasks are described in the topics that follow.
This step creates a Session Bean, along with the .wsdl files
describing it as an EJB service and bindings.
- 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.)
- Right-click the file and choose Enterprise Services>Generate Deploy
Code. The Generate Deploy Code dialog displays.

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

- 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.
- Choose Next. The Inbound Service Files dialog appears.
- In the Inbound Service Files dialog, edit as necessary and specify a
meaningful package name for both the port name and the binding name.
- Choose Next if you need to change the JNDI lookup name, or choose
Finish.
- 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:

- 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.
