WebSphere Enterprise Service Bus, Version 6.2.0 Operating Systems: AIX, HP-UX, i5/OS, Linux, Solaris, Windows


Dynamic invocation using the SCA Endpoint Reference API

An Endpoint Reference (EPR) address can be set directly by using the SCA Endpoint Reference API.

Setting an endpoint address using the SCA Endpoint Reference API

Details about the EPR can be obtained by retrieving information about the endpoint from a suitable storage location, such as WSRR or a database. This information is used to set EPR details for the message using the SCA Endpoint Reference API. For example, a POJO can update the endpoint address using code similar to the following:
EndpointReference epr = EndpointReferenceFactory.INSTANCE.createEndpointReference();
epr.setAddress(uri);
epr.setBindingType(EndpointReference.BINDING_TYPE_JMS);
Service dynamicService = (Service) ServiceManager.INSTANCE.getService(refname, epr);

Setting a target import using the SCA Endpoint Reference API

A target import can be set directly using the SCA Endpoint Reference API. If the dynamic override requires a target import, it can be specified by including code that provides the name of the module import. For example, a POJO can set a target import using code similar to the following:
EndpointReference epr = EndpointReferenceFactory.INSTANCE.createEndpointReference();
epr.setImport("this/is/the/name/of/the/import");
epr.setAddress(uri);
epr.setBindingType(EndpointReference.BINDING_TYPE_JMS);
Service dynamicService = (Service) ServiceManager.INSTANCE.getService(refname, epr);

Setting an Endpoint Reference binding type

An Endpoint Reference binding type value ensures that the correct dynamic invocation takes place. Possible values for the binding type include:
EndpointReference.BINDING_TYPE_NOT_SET
EndpointReference.BINDING_TYPE_JMS
EndpointReference.BINDING_TYPE_MQJMS
EndpointReference.BINDING_TYPE_GENERIC_JMS
EndpointReference.BINDING_TYPE_MQ
EndpointReference.BINDING_TYPE_WEB_SERVICE
EndpointReference.BINDING_TYPE_HTTP
EndpointReference.BINDING_TYPE_SCA
EndpointReference.BINDING_TYPE_EIS

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.doc/ref/rwesb_dynamicoverrideepr.html
Copyright IBM Corporation 2005, 2010. All Rights Reserved.
This information center is powered by Eclipse technology (http://www.eclipse.org).