Tuesday, January 14, 2014

BizTalk 2010 and integrating with the Java Messaging Service (JMS) SonicMQ Part 2 Configuration

The second post on the JNBridge JMS Adapter for SonicMQ will cover configuration of the JMS send adapter transport handler.  If you haven't already read Part 1 , I suggest you do so before continuing.  That post covers the installation of the adapter onto a BizTalk 2010 Server.  Although installation is pretty straightforward, the post also details how to get the third party adapter from JNBridge, as this adapter doesn't come out of the box with BizTalk.

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.  

Thursday, January 2, 2014

BizTalk 2010 and integrating with the Java Messaging Service (JMS) SonicMQ Part 1 Installation

I recently worked on a Proof of Concept (POC) with BizTalk 2010 and integrating with a Java Messaging Service (JMS) queue called SonicMQ.  Having never done this, I did a quick Google search to see if I could leverage any existing adapters.  Luckily, there is already a a third-party JMS adapter created by JNBridge.   They offer a 30 day trial version of the software, so I downloaded the install bits and went through the installation and configuration.  I want to use this post to go through the installation of the adapter.  I'll follow up with a second post on the configuration of the adapter.

Installing the JMS Adapter from JNBridge

The installation of the JMS adapter by JNBridge is fairly straight forward.  Since my environment is 64 bit, I downloaded the msi file for the 64 bit environment (latest version is JMS Adapter for BizTalk Server v3.0.1 x64).  Double clicking the msi file brings up the installation wizard:

I accepted the License agreement terms:

I kept the default install directory and installed the software:

After the installation completes, I went ahead and added the adapter in BizTalk Administrator.  To do this, I opened BizTalk Administrator, navigated to "Platform Settings" and expanded the group, then right clicked the "Adapters" option and selected "New" and "Adapter...":

Under the Adapter properties, from the Adapter pull down list, I selected "JNBridge JMS":

After giving the adapter a name and clicking the "OK" button, the installation of the JNBridge JMS adapter is complete.  Don't forget to update the adapter to use specific hosts.  If your like me, I have a different host for sending and receiving.  Lastly, the JMS Adapter requires an install of the Java Runtime Environment (JRE), which you can download from Oracle.

Up next, the steps needed to configure the JNBridge adapter.  In my particular instance, I am connecting to SonicMQ, but the JNBridge JMS Adapter can work with multiple vendors.  The JNBridge website has a list of those vendors and the supported JMS versions.  It's important to check that list to ensure the adapter will work with your particular implementation.