Wednesday, July 16, 2008

Export\Import (JMS)

QExport/Import JMS Binding How to

Websphere Integration Developer v612

Contact us...

Introduction

When to use JMS bindings
Consider a JMS binding when these factors are applicable:
  • You need to access a messaging system
  • The services are loosely coupled
  • Reliability is more important than performance; that is, asynchronous data transmission is preferred over synchronous.
  • Note: There are several types of JMS bindings. If you are using the Web Service binding, only the SOAP/JMS transport protocol is supported. See Service import and export binding types.
Related links

How to generate a JMS export Binding

Related links

Generating a JMS export binding

Generate JMS Export

In the assembly diagram, do the following:

  1. Right-click on a component (i.e DateTime_C)
  2. Select Generate Export > Messaging Binding > JMS Binding
  3. The Configure JMS Export Service dialog box opens (see below).

Configure JMS Export Service

An interface with a two-way operation results in the dialog shown on the opposite column.

Configure the JMS export service as follows:

  1. JMS messaging domain
    Point-to-Point or Publish-Subscribe. Publish-subscribe is selectable if the interface only has one-way operations.
  2. End-point configuration
    Select if you wish to Configure new messaging provider resources (the default) or Use pre-configured messaging provider resources. If you choose pre-configured, then add the JNDI names for the activation specification and the receive destination for a one-way operation, and receive and send destinations for a request-response operation.
  3. Security configuration
    A common way for specifying a userid and password is through using the J2EE Connector (J2C) authentication data entries. The entries are defined on the server. In the Security configuration section, select Specify a Java Authentication and Authorization Services (JAAS) alias security credential when server security is enabled, if it is used by your organization. Enter the J2EE Connector (J2C) authentication data entry.
  4. Data format
    Select how the data will be serialized between the business object and the JMS message with a data binding. Clicking Browse beside the Data binding configuration field, launches the Data Binding Selection dialog box (see below)
  5. Function selector
    Determine which function selector configuration to use. A function selector selects an operation to invoke on your component at runtime. The operation maps to a function to be performed based on the content of the JMS message. For example, the message may contain an Employee record and be used to create, update, retrieve, or delete the an Employee record. The actual operation to invoke is determined from content in the header or body of the JMS message.

    In the Function selector section, select the function selector configuration you want to use. Clicking Browse beside the Function selector configuration field, launches the Function Selector Selection dialog box (see below)

After configuring the required properties, click OK to continue (see JMS export binding generated below).

Select Data binding

In the Data binding selection window, select the required data binding:

  1. Show data binding configurations
    (default) lists the data binding configurations you have created. Creating your own data binding configurations is discussed in Working with configurations that access external services.
  2. Show predefined data bindings
    lists the predefined data bindings provided by WebSphere Integration Developer. The available predefined data bindings are discussed in JMS, MQ JMS and generic JMS bindings. If you intend to use one of the default data bindings beginning with Simple JMS, you must have previously created the business objects required (see the Prerequisites section).
  3. Show data binding classes
    lists all data binding classes available.

Click OK to continue.

Select function selector

In the Function selector window, select the required function selector:

  1. Show function selector configurations (default) lists the function selector configurations you have created. Creating your own function selector configurations is discussed in Working with configurations that access external services.
  2. Show predefined function selectors
    lists the predefined function selectors provided by WebSphere Integration Developer. The available predefined function selectors are discussed in JMS, MQ JMS and generic JMS function selectors.
  3. Show function selector classes
    lists all function selector classes available.

JMS Export Binding generated

The basic JMS binding is created and shown in the properties view when the Binding tab is selected.

Note: The JMS binding is complete at this point. You would only change the values for the fields shown in the properties view if a change were required in the binding sometime after generation. Some of the values will need to match those specified on the server such as the resource adapter name and bus name.

Messaging provider resources

When you deploy this project, the following messaging resources (opposite column) will be automatically generated.

How to generate a JMS import Binding

Related Links

Generating a JMS import binding

Creating an import from an export using a JMS binding

Generate JMS import from an JMS export

We will create an JMS import binding from an existing JMS export.
  1. Open the assembly diagram of a service requester module (i.e CCambil_Consumer_M)
  2. Drag the JMS export of the service provider module (i.e DateTime_CExport) which is in CCambil_Provider_M module and drop it into the assembly diagram of the service requester module (i.e CCambil_Consumer_M)
  3. An warning window appears (see below)

Creating Import from Export using JMS binding

Essentially, this warning message requires you to deploy the export module first, otherwise a runtime exception will occur.
Click OK to continue.
Wire the Import
Wire the service requester component (i.e CCambil_Consumer_C) to the import as required.

No comments: