After installing the JMS Adapter, configuring the adapter falls into two parts. The first part covers configuring the send adapter transport handler and will be explained in this post. The second part will cover creating the send port in a BizTalk Application and will be detailed in a subsequent post. Setting up the JMS adapter for the receive transport handler and receive location should be very similar to the send handler and port and will not be covered.
Configuring the JMS Adapter Send Transport Handler
When configuring the send transport handler for JMS, there are several properties that are important and dependent upon the SonicMQ which is being integrated with. If your unfamiliar with SonicMQ (like me), it's important to have a detailed discussion with whoever is responsible for this application. Doing so will ensure the below properties are properly configured which in turn will save a lot of time and effort.
In order to edit the properties of the send handler, you will need to open BizTalk Administrator, and navigate to "Platform Settings", "Adapters", "JNBridge SonicMQ", and finally right click the "SendHost" and select the properties option:
The first section of properties that need to be configured are under the section "JMS Properties". I started with the property called "Acknowledge Mode" A pull down list is provided for this property. There are three choices, "AUTO ACKNOWLEDGE", "CLIENT ACKNOWLEDGE", and "DUPS OK ACKNOWLEDGE". In my case, I selected the "AUTO ACKNOWLEDGE" which also happens to be the default:
The second property to be configured is called the "Initial Context Factory". This is an editable field and needs the name of a JNDI class. I'm not going to explain what JNDI is, as it's outside the scope of this post. In my scenario, a named SonicMQ domain is required, which the JNBridge Adapter supports. In order for the JMS adapter to support this, I am required to use com.sonicsw.jndi.mfcontext.FixedMFContextFactory as the initial context factory:
The JMS Scheme is the protocol used to connect to the JMS service. In the case of SonicMQ, that is tcp:
The next property(s) that need to be configured are the Queue Factory or Topic Factory. This is the class name of the SonicMQ factory. In my case, I only filled out the Queue Factory property since that is what I'm connecting to. I left the Topic Factory property blank:
The Security mode property is the last under the "JMS Properties" section of the send handler. This property is another drop down list and allows the passing of credentials to the JMS server. The options are none, simple, and strong. In my case, I need to pass credentials so I selected the simple option:
The second section of properties that need to be configured are under the "JNBridge Properties" section. These properties are JN Bridge specific and I'm not going to go into details on the set up of these properties. The documentation provided by JN Bridge is pretty thorough and will guide you on the proper values required for each property. One point I do want to comment on is the "JVM Arguments" property. This property allows me to pass a named SonicMQ Domain and ties directly to the "Initial Context Property" configured above:
The third section called "Security Properties" has to do with credentials needed to connect to the JMS server. Since I selected the "simple" in the Security Mode Property under the JMS Properties section, I will need to pass a username and password. This should be supplied by the owner of the SonicMQ application:
The last section "Debug Properties", isn't required, but is worth mentioning. I relied upon this heavily when first trying to connect to the JMS SonicMQ Queue. It provides verbose logging when the JMS adapter is trying to connect to SonicMQ. After your successful in connecting, you can just switch the "Log Errors" flag to false
That is the last section of the JMS adapter send handler transport properties to configure. In the next post, I'll cover creating the send port in BizTalk Administrator and what you should consider before using the JNBridge JMS adapter.