How to enable dynamic invocation of an endpoint with a wired Java™ Message Service (JMS) data binding import. This information also applies to MQ JMS binding and Generic JMS binding.
You create a mediation module that includes the dynamic endpoint, by performing tasks in WebSphere® Integration Developer.
epr = EndpointReferenceFactory.INSTANCE.createEndpointReference(); epr.setAddress(uri); epr.setBindingType(bindingType); 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, and 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 Export 3 identified as the endpoint in the message. 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 deployment. The POJO uses the SCA Endpoint Reference API, and the reference wired to a JMS Import, to invoke the remote service specified by the endpoint in the message. The remote service is invoked using the wired JMS Import. 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.