Generating a WebSphere MQ JMS export binding with either a one-way operation or request-response operation is shown. Once generated, the binding properties are discussed.
If you intend to use the standard JMS message class with a body type containing the message then you must create business objects for these body types. A function is provided that will create the entire set of business objects for the JMS body types. In your module, open the dependencies editor. Under Predefined Resources, select Schema for simple JMS Data Bindings. Save your work and close the dependencies editor. In the navigation view under Data Types, the business objects are created.
Afterwards, create an interface for your export that contains the appropriate data types for input and output. For example, if you were using the TextMessage body, create an interface with an operation such as handleText with an input type of JMSTextBody and an output type of JMSTextBody. These data types will be selectable from the types in the interface editor.
Select the messaging domain: Point-to-Point or Publish-Subscribe. Publish-subscribe is selectable if the interface only has one-way operations.
Select if you wish to Configure new messaging provider resources (the default) or Use pre-configured messaging provider resources. If you choose pre-configured, then add the JNDI names for the connection factory, receive destination for a one-way operation, and receive and send destinations for a request-response operation, and the receive destination listener port name. You may specify the WebSphere MQ queue manager or use the default queue, which is preselected.
In the Security configuration section, the J2C Authentication Data Entry property lets you specify an authentication alias that should be configured on the server with a userid and password.
In the Data format section, select how the data will be serialized between the business object and the JMS message. For data bindings beginning Simple JMS, you must have previously created the business objects required (see the Prerequisites section). The default data bindings are:
The alternative is for you to provide your own data binding for the serialization, in which case select User Supplied. The implementation has to conform to the JMS data binding interface.
The FunctionSelector class provides a valuable service at run time. It selects an operation to invoke on the component. In the Function selector section, if you do not wish to use the default JMS function selector class, deselect it. After deselecting the default JMS FunctionSelector, you should browse and select the FunctionSelector you do wish to use.
If you intend to use the standard JMS message class with a body type containing the message then you must use a specific function selector, which uses the JMSType message property to determine its operation name. For example, if you had selected for your serialization type, Simple JMS TextMessage Data Binding, then you would use this particular function selector. Deselect the Use the default JMS Function Selector class check box. Click Browse and select JMSFunctionSelector from the Select Type dialog box. The qualified class name is com.ibm.websphere.jms.data.bindings.JMSFunctionSelector.
Click OK. The MQ JMS binding is created and shown in the properties view when the Binding tab is selected. Sub tabs under the binding tab provide binding information details, which are discussed in the next steps.
The Connection Factory Properties section specifies the connection factory properties such as the transport, which defaults to BINDINGS. With the bindings mode, WebSphere MQ JMS classes use the Java Native Interface (JNI) to call directly into the existing queue manager API rather than communicating through a network. Since bindings is a shared memory protocol, it may offer better performance. If you select CLIENT for a client binding, then client configuration properties become active requiring you to specify the host name, channel and port. See Using binding or client transports for more information. Further down this page, though not shown in the screen capture below, are MQ local address properties. Show Advanced specifies the listener type.
Clicking Show Advanced found
lower on this page and not in this screen capture lets you specify the input
and output serialization types, which determines how the data will be serialized
between the business object and the JMS message.