How to enable dynamic invocation of an endpoint with an unwired Java™ Message Service (JMS) data binding import. This information also applies to MQ JMS binding and Generic JMS binding.
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 JMS URI has the same prefix as a WebServices SOAP/JMS endpoint address. Identify the correct endpoint type by adding a binding type attribute to the endpoint reference. If you do not specify the binding type attribute for the JMS URI, the address is interpreted as a SOAP / JMS endpoint, unless the endpoint reference is wired to a JMS import.
The JMS endpoint used in the dynamic invocation is structured according to the JMS URI standard.
>>-scheme--:--jms-variant--:--jms-dest--?--parameter-----------><
The JMS Connection Factory uses application managed security. It does not use container managed security. This means that you must set the component managed authentication alias.
An example of a valid JMS URI would be:
jms:jndi:MyTargetQueueName?jndiConnectionFactoryName=MyConnectionFactoryName
The input name for the send destination and the connection factory must already be defined in the server.
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 2 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.