How to enable dynamic invocation of an endpoint with an unwired EIS data binding import, with endpoint and attribute override.
You create a mediation module that includes the dynamic endpoint using WebSphere® Integration Developer.
epr = EndpointReferenceFactory.INSTANCE.createEndpointReference(); epr.setAddress(uri); epr.setBindingType(bindingType); epr.setImport("Import1"); Service dynamicService = (Service) ServiceManager.INSTANCE.getService(refname, epr);Identify the correct endpoint type by adding a binding type attribute to the endpoint reference.
An SCA endpoint reference is created, and stores the JNDI for the connection factory that generates the dynamic endpoint. The SCA endpoint reference is stored in the Endpoint Reference in the SCA message. When an SCA message is received, the EIS Import handler identifies the Endpoint Reference in the message, and uses this to find the JNDI of the connection factory that generates a target address. The EIS binding uses the Connection Factory to obtain the target address of the dynamic endpoint. If a target address is found, the message is sent there. If no target address is found, the message is sent to the original endpoint.
>>-scheme--:--jca-variant--:--jndiName-------------------------><
An example of a valid JCA URI would be:
jca:jndi:dynamicTestJNDIUnwired
This URI tells the EIS Import handler to look for a Connection Factory defined in JNDI as dynamicTestJNDIUnwired.
Dynamic invocation for JDBC adapters takes place when the POJO is invoked with JNDI names for the connection factory, the new interation specification, and the new connection specification. The POJO extracts the endpoint information and the connection attributes from the message. The POJO uses the SCA EPR API and the reference wired to the Import to invoke the remote service. The interaction specification and connection specification information is retained in the EPR properties table for later re-use. Any response is returned by the response flow to the POJO.
Instead of using JDBC, the adapters might be for CICS, IMS, or SAP. The adapters which might be connected to the Import must have the same portType. For example, it is an error to use JDBC for Mediation Module 2 at the same time as using CICS for Mediation Module 3.
A one-way invocation message works the same way as a two-way message, except that no response message is returned.