Generating an MQ JMS import binding with either a one-way operation or request-response operation is shown in this section. 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 import 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 and the send destination for a one-way operation, and send and receive destinations for a request-response operation. 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. The operation maps to a function to be performed based on the content of the JMS message. For example, the message may contain an Employee record and be used to create, update, retrieve, or delete the an Employee record. The actual operation to invoke is determined from content in the header or body of the JMS message. In the Function selector section, if you do not wish to use the TargetFunctionName message header property for the default JMS function selector class, deselect it.
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 mode, 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 reveals connection pool properties that you can override.
Clicking Show
Advanced found lower on this page and not shown 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.