WebSphere Enterprise Service Bus for z/OS, Version 6.2.0 Operating Systems: z/OS


Dynamic invocation with a target import

Dynamic invocation of endpoints can be enhanced using target import bindings.

Introduction

Dynamic invocation with a target import uses a service that is invoked using a supported import binding. The import and its binding must already be available within the module, and is selected at runtime according to information contained in the message.

Enabling dynamic invocation with a target import

You can use WebSphere® Integration Developer to create a mediation module that selects the target service dynamically at runtime. The target services might use different protocols, different formats or different quality-of-service values. Each combination must be known at the time the mediation module is developed. This means that for each combination of protocol, format, and quality-of-service value, WebSphere Integration Developer includes an import in the mediation module with an appropriate configuration.

For example, one MQ accesses one target service and a JMS queue accesses another target service. A quality-of-service example might be where one import uses security, but another import does not. The choice between the target service destinations is made dynamically at runtime using available metadata. Imports for both the services would have to be included in the mediation module by WebSphere Integration Developer.

Figure 1. Dynamic invocation with a target import
A message flows through a mediation module and an import binding to a Web service. Information in the message can override the endpoint dynamically.
During development of a mediation module, an import might be wired to another component or might be left unwired, as shown in Figure 1. If the module is unwired, a connection must be created at runtime by specifying a target import and creating the connection dynamically.

What happens at runtime

WebSphere Integration Developer includes logic in the mediation module to retrieve endpoint URIs dynamically at runtime. The message passing through the mediation module provides an endpoint URI, and an associated target import name. The import name identifies one of the imports within the mediation module that has the appropriate binding. The target import name could also be identified from the metadata associated with the endpoint, the endpoint URI itself, or stored in the same location as the endpoint URIs, although in general it would not appear directly in the WebSphere Service Registry and Repository (WSRR).

When the invocation occurs, an Endpoint Reference (EPR) is provided containing the endpoint URI and a target import name. If a target import name is provided, and the endpoint URI is compatible with the named import binding, the named import and the relevant qualifiers are used to invoke the target service. If the endpoint URI is not compatible with the import binding, a runtime error occurs.

A target import name always takes precedence over an existing wired import within the mediation module, even if the target URI is compatible with the wired import binding but not the target import binding.

Storing import information

You can use the target import to store additional metadata such as combination of protocol, format, and quality-of-service settings, that you require to make a remote invocation. You must declare a target import and package it with the mediation module. The name of the import can be stored in any easily accessed form, such as a database. For use with a mediation flow component, you can set the name of the target import using mediation flow component capabilities in the SMO. For use with SCA, you can set the target import name in the EPR object. In the case of SCA usage, you cannot specify alternate targets.

reference Reference topic

Terms of use | Feedback


Timestamp icon Last updated: 21 June 2010


http://publib.boulder.ibm.com/infocenter/dmndhelp/v6r2mx/topic//com.ibm.websphere.wesb620.zseries.doc/ref/rwesb_dynamicoverrideimport.html
Copyright IBM Corporation 2005, 2010. All Rights Reserved.
This information center is powered by Eclipse technology (http://www.eclipse.org).