IBM BPM, V8.0.1, All platforms > Programming IBM BPM > Enterprise Service Bus programming > JMS binding

Use dynamic JMS endpoints

You can dynamically invoke services using JMS import bindings. The import that you invoke is decided at run time and does not need to be wired directly to a component. During a dynamic invocation, you do not specify the endpoints that you use in the import bindings.

If you use a mediation flow component, you can specify a target import and dynamic endpoint address using some mediation primitives.

For example, the Message Element Setter mediation primitive.

Figure 1. Mediation module with an unwired import which is configured to use service provider 1

Figure 1.shows a mediation module that includes an import, which is not wired to the mediation flow component. The import is configured to use service provider 1. Using the mediation flow component, the target import is specified in the SMO, and the unwired import is invoked. Other imports can be selected instead, if they are available. If you specify a target endpoint in the SMO, it overrides the imports reference to service provider 1, and replaces it with service provider 2. The service that is invoked at run time, is decided on a message by message basis.

You can override the endpoint address or the target import using the Target and AlternateTarget sections of the SMO structure. The section of the SMO that you use to enable dynamic invocation is shown below:

The address field includes the dynamic invocation target service URI for requests. When requests are routed, the @bindingType field provides further details about the URI. It indicates the type of binding that is used during a dynamic invocation. When requests are routed, the @import field provides the name of a target import that is used for dynamic invocation.

The JMS endpoint that is used in the dynamic invocation, is structured according to the JMS URI standard. In summary, the standard requires that JMS URIs have the following form:

>>-scheme--:--jms-variant--:--jms-dest--?--parameter-----------><

An example of a valid JMS URI is:

jms:jndi:MyTargetQueueName?jndiConnectionFactoryName=MyConnectionFactoryName

JMS binding