JMS Inbound Connection
Overview
You can have multiple JMS Connections defined in the UAC.xml file. The only requirement is that you have the corresponding queues or topics configured in your JMS Provider.
Setting Up an Inbound JMS Listener
To set up an inbound JMS Listener, you must:
- Supply values for the following items in the UAC.xml file:
- Name
Name of the connection which is user-defined. If you are going to define more than one JMS listener, the name for each JMS Connection must be unique. - Initial Context Properties
Name/value pairs identified as properties that specify JMS Provider-specific information. Two items that must be specified are the Initial Context Factory and the Provider URL. - Connection Factory
Name of the JMS Provider Connection Factory class to use.
- Name
- Specify the attributes for the JMS Listener, which include Destination and Actions. Currently, the only Action that is supported is writing the inbound transaction to a file.
- Destination
Queue or topic on which to listen for inbound messages. - Directory
Output directory where UAC will write the file. You must specify an absolute path to a directory associated with the relevant business process. This path should be valid and reachable either locally or via a network. The only requirement is that the directory must exist prior to commencing inbound operations. - File Name Pattern
Name of the file and the sequence pattern (if there will be more than one file written to the same directory). The format is <filenamehere%Seq%.txt>, where filenamehere is the name of the file you have chosen.
- Destination
File name restrictions are enforced by the file system to which the file is being written. For example, using double quotation marks ( " ) around a file name in Windows will result in an error.
- Start Sequence Number
Starting number to use for the pattern sequence (%Seq%). - Write Properties
Specification for whether or not the JMS properties should be written to the file. The default value is false. However, if it is useful to see what was specified in the properties of the JMS message, set the value to true.
JMS Connection Sample
The following figure illustrates a sample JMS Connection section in the UAC.xml file. The values in red are the values discussed above.
(This sample illustrates a configuration using IBM's WebSphere Application Server as the JMS Provider.)
See UAC.xml File Description for details on the elements and structure of the UAC.xml file.
<sb:JMSConnection>
<sb:Name>WebSphere</sb:Name>
<sb:InitialContextProperties>
<sb:Property>
<sb:Name>java.naming.factory.initial</sb:Name>
<sb:Value>com.ibm.websphere.naming.WsnInitialContextFactory</sb:Value>
</sb:Property>
<sb:Property>
<sb:Name>java.naming.provider.url</sb:Name>
<sb:Value>iiop://myServer:2809</sb:Value>
</sb:Property>
<sb:Property>
<sb:Name>com.ibm.CORBA.ORBInit</sb:Name>
<sb:Value>com.ibm.ws.sib.client.ORB</sb:Value>
</sb:Property>
</sb:InitialContextProperties>
<sb:ConnectionFactory>jms/ConnectionFactory</sb:ConnectionFactory>
<sb:Listeners>
<sb:JMSListener>
<sb:Destination>jms/IntegrationTestQueue1</sb:Destination>
<sb:Actions>
<sb:JMSFileWriter>
<sb:Directory>/home/userdirectory/outputDirectory</sb:Directory>
<sb:FilenamePattern>WASjmsMessageQueue%Seq%.txt</sb:FilenamePattern>
<sb:StartSequenceNumber>1</sb:StartSequenceNumber>
<sb:WriteProperties>false</sb:WriteProperties>
</sb:JMSFileWriter>
</sb:Actions>
</sb:JMSListener>
</sb:Listeners>
</sb:JMSConnection>