How to enable dynamic invocation of an endpoint with an unwired MQ data binding import.
You can create a mediation module that includes the dynamic endpoint, by performing tasks in WebSphere® Integration Developer.
All the endpoints must use the same import binding configuration. The POJO identifies the required import in EPR, then uses SCA to wire to a compatible import.
epr = EndpointReferenceFactory.INSTANCE.createEndpointReference(); epr.setAddress(uri); epr.setImport(importName); Service dynamicService = (Service) ServiceManager.INSTANCE.getService(refname, epr);
The MQ endpoint used in the dynamic invocation is structured using a subset of the MQ URI standard.
wmq:/msg/queue/queueName wmq:/msg/queue/queueName@qmgr
Dynamic invocation takes place when the POJO is invoked with the target import and Export 3 identified as the endpoint in the message. The POJO uses SCA EPR API to resolve the Import. The POJO extracts the endpoint from the message, and identifies Export 3 as the endpoint, rather than the Export 1 endpoint specified in the original Import. The POJO invokes the remote service specified by the endpoint in the message, through the target import specified in the message. After the service is invoked, a response is returned to the POJO.
A one-way invocation message works the same way as a two-way message, except that no response message is returned.
If the POJO is invoked with an empty or missing argument for the endpoint, the default invocation is used, calling Export 2 and POJO 2.