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 import binding

Generating a generic JMS import binding with either a one-way operation or request-response operation is shown in this section. Once generated, the binding properties are discussed.


Prerequisite: 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 import. A generic JMS binding is used when you want to access a vendor-neutral messaging provider.


Procedure

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

    Alternately, from the palette under Components, select Import and drag it on to the canvas. An import with no implementation and no interface is created. Right-click the import, select Add Interface from the menu and add an interface describing your interaction with a generic JMS client. Generate the generic JMS binding by selecting the import and from the menu selecting Generate Binding > Messaging Binding > Generic JMS Binding.

  2. The Configure Generic JMS Import Service window box opens. The window is similar for both an interface with a one-way operation or a request-response operation. However, an interface with a request-response operation has an additional field for a receive 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 send 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 send 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 next section, if you want to use the TargetFunctionName message header property to be used with module to module communication, select it. 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 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 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.Send Destination Properties displays the external JNDI name for the send 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 has a field for the listener port name and specifies the number of retries and sessions for the listener port. It displays the receive 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.


    JMS delivery mode can be persistent or non-persistent and the JMS priority sets the priority of the message in a 0 to 9 range, with 9 the highest in priority. If no selection is made then the priority is determined by the application. Custom Headers allows you to specify a name, type and value for a property.

  6. Selecting the Faults configuration tab lets you configure the faults specified on the operations in the interface. The configuration of faults is optional. The configuration can apply to all operations or a specific operation.

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

    Click Select beside Fault selector to configure a fault. Your selections are as follows:

    Specifying a fault selector requires that you also specify the data format for the fault. Click Select beside Business fault data format . Your selections are as follows:

    Expanding Advanced, lets you also specify the data format for a runtime exception.

  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. 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. Use a temporary dynamic destination for receiving responses uses a temporary destination for each request. This selection does not use a correlation ID as the import listens for responses on that destination.

    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 runtime or application. The default is to use runtime context propagation. See Propagation.

  10. Selecting the Summary tab specifies the send and receive (in the case of a request-response operation) JNDI names and connection factory name and data binding class name. They are names generated by the SCA JMS handler or defined by yourself when the application is deployed. You may need the JNDI names if you are authoring the targeted JMS application.


What to do next

You have created a generic JMS binding for an import. Compare this approach with creating a generic JMS binding for an export, which is similar.

Generic JMS