IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Services and service-related functions > Access external services with messaging systems > Generic JMS

Generate a generic JMS export binding

Generating a generic JMS export binding with either a one-way operation or request-response operation is shown. When generated, the binding properties are discussed.


Prerequisites: You should have a module.

If you intend to use the standard JMS message class with a body type containing the message then use the business objects provided for these body types (see Work with the simple JMS data bindings).

In this set of steps, you will learn how to create a generic JMS binding for an export. A generic JMS binding is used when you want to have your service accessed in an asynchronous manner with a vendor-neutral messaging provider.


Procedure

  1. Open the assembly editor. Under Inbound Exports, select Generic JMS and drag it to the assembly editor. Select an interface or create one.

    Alternately, from the palette under Components, select an export and drag it on to the canvas. An export with no implementation and no interface is created. Right-click the export, select Add Interface from the menu and add an interface that describes your interaction with a JMS application. Create an export with a JMS binding by right-clicking the export and from the menu selecting Generate Binding > Messaging Binding > Generic JMS Binding.

  2. The Configure Generic JMS Export Service window box opens. There is a slight difference between an interface with a one-way operation and an interface with a request-response operation. An interface with a request-response operation has an additional field for a send destination.

    Select the messaging domain: Point-to-Point or Publish-Subscribe.

    Select if you want to Configure new messaging provider resources (the default) or Use pre-configured messaging provider resources.

    When you configure the generic messaging provider resources using provider-specific facilities and select the first option, specify the generic messaging provider name and the JNDI lookup names for the connection factory and the receive destination for a one-way operation, and send and receive destinations for a request-response operation. These resources are treated as external resources. The deployment will automatically create the JMS resources (aliases) required in IBM BPM for these external resources.

    If you choose pre-configured messaging provider resources, then add the JNDI names for the connection factory and the receive destination for a one-way operation, and send and receive destinations for a request-response operation. These are resources configured in the IBM Process Server administrative console that wrap external resources.

    It is your responsibility to set up the third-party messaging provider and map the messaging provider's connection factory and send and receive destination queues to these JNDI names.

    If you specify JNDI names and then switch to specifying your own configuration properties both sets of values remain in memory until you close the editor. You are saved from reentering the values while you decide.

    In the Default data format field, select how the data will be serialized between the business object and the JMS message with a binding. To change the default, click Select beside the field to launch the Data Transformation Configuration window. Your selections are as follows:

    In the Function selector section, select the function selector configuration you want to use. A function selector selects an operation to invoke on your component at run time. Clicking Select beside the Function selector field, launches the Function Selector Configuration window and provides the following selections:

    In the next section, if you want to use the default module to module fault handling, which is a SOAP transport, select it.

    A common way for specifying a userid and password is through using the Java EE 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 Java EE Connector (J2C) authentication data entry.

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

  3. Selecting the End-point configuration tab and the Request tab, displays the external JNDI name for the connection factory you added earlier. Advanced allows you to specify connection pool properties like a timeout value. Listener Port Properties provides a field for the listener port name and specifies the number of retries and sessions for the listener port. Receive Destination Properties displays the external JNDI name for the recieve destination you added earlier. You have the option of changing these JNDI names or using JNDI names that map to a pre-configured messaging provider resource.

  4. Selecting the Response tab in the case of a request-response operation, displays the send destination external JNDI name added earlier, which you can change, and the connection factory properties. By default, response is handled by the same connection factory as request. Selecting Configure response connection allows you to use a different JNDI name for the response connection factory.

  5. Selecting Method bindings shows the bound methods. By default, all methods are bound. If you add a method to the interface after you created the binding, however, a Bind operation check box becomes available for you to add it to the bound methods.

    The Generic tab lets you add a description of the method binding.

    The Data Serialization tab lets you specify the input and output serialization types, which determines how the data will be serialized between the business object and the JMS message.

    Message type is used by the server to create and send the outgoing message. It is used with some data format transformers. If the server does not use the message type specified then it is disabled. Valid types are byte, map, object, stream or text.

    Under JMS Headers, the properties you can specify are as follows. The JMS Type property conforms to the JMSType specified in the JMS specification. This property contains a message type identifier supplied by a client when a message is sent. The JMS Correlation ID property conforms to the JMSCorrelationID in the JMS specification. A typical use is to link a response message with its request message. In IBM Integration Designer, the ID is used by the message selector to select only messages with that ID. It can be any string value. JMS message properties can effectively be used to add optional header fields to a message. Custom Headers allows you to specify a name, type and value for a property.

  6. Selecting the Faults configuration tab lets you configure the business fault data format for the faults in the interface. The configuration of faults is optional. The configuration can apply to all operations, a specific operation or a specific fault.

    If fault configuration is new to you, see Handling faults in bindings for an overview.

    Click Select beside Business fault data format . Your selections are as follows:

  7. Selecting Security attributes shows the authentication properties under Authentication Properties section. The J2C Authentication Data Entry property is available if you want to specify a name. If Advanced is selected, authentication properties are shown such as the level of the authentication; for example, at the container level.

    Selecting Response and expanding the Authentication Properties section opens the authentication properties for the response connection, if you had specified one earlier in the end-point configuration. The J2C Authentication Data Entry property is available if you want to specify a name. If Advanced is selected, authentication properties are opened such as the level of the authentication; for example, at the container level.

  8. Selecting the Message Configuration tab shows the correlation scheme for the response message.Request Message ID to Correlation ID adds a request ID to the request message. It is expected that the reply copies the request ID to the correlation ID field of the response message so that the caller can correlate the reply message with the request message. Request Correlation ID to Correlation ID adds the correlation ID to the request message. It is expected that the reply copies the request correlation ID to the correlation ID field of the response message so that the caller can correlate the reply message with the request message.

    The Asynchronous reliability property can have these values: assured (default) or bestEffort. Select assured if you want a message to persist through a transaction. In other words, if you want guaranteed delivery of the message. Select bestEffort if you want a high throughput of messages and your application can accept and handle the loss of a message, as persistence is not guaranteed.

    Event sequence required specifies if the sequence of messages is ordered and requires responses in the same order.

    Failed message recovery mode lets you allow the binding to manage the recovery of failed messages (the default) or rely on the transport-specific method of recovery. Allow binding to manage recovery for failed messages creates a recovery queue on deployment to handle failed messages. Binding errors are handled as failed events that can be retrieved later. Rely on transport-specific recovery for failed events does not set up a recovery mechanism.

  9. The Propagation tab lets you select two types of context propagation. Context propagation takes information associated with a runtime or an application and passes it along with requests that are the result of interactions with that run time or application. The default is to use runtime context propagation. See Propagation.

  10. Selecting the Summary tab specifies the receive and send (in the case of a request-response operation) JNDI names for destinations and the request and response connection factories. The listener port name, function selector class name and data binding class name are also specified. The JNDI names are generated by the SCA JMS handler or defined by yourself when the application is deployed. You might need the JNDI names if you are authoring the targeted JMS application.


What to do next

You have created a generic JMS binding for your export. Compare this approach with creating a generic JMS import binding.

Generic JMS