How to configure Apache Active MQ as Custom JMS with TIBCO ActiveMatrix BusinessWorks Software BW 6.5.0 or later?

How to configure Apache Active MQ as Custom JMS with TIBCO ActiveMatrix BusinessWorks Software BW 6.5.0 or later?

book

Article ID: KB0072705

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks 6.5.0 and above

Description

Below Steps help in configuring Active MQ as Custom JMS in BW 6.x version, please note that the option for custom JMS is available after BW 6.5.0 version.
Active MQ 5.15.7 was used for this article along with BW 6.5 or later.

Note: This article provides the steps for configuring Apache Active MQ using custom JMS in BW, we don't need to Install the AMQP plugin for this.

 

Issue/Introduction

Below article shows how to configure Active MQ as Custom JMS in BW 6.5.0

Resolution

Installing Active MQ and Starting MQ Server.
->Download Active MQ from URL: http://activemq.apache.org/components/classic/download/

User-added image

Select Windows distribution inside latest stable version

. User-added image

To start the ActiveMQ goto bin directory after extracting the downloaded Zip file.(Make Sure you have Java executable in $PATH system varaiable/environment Variable)
C:\apache-activemq-5.15.7-bin\apache-activemq-5.15.7\bin>.

In latest Versions, there are subfolders names win32 and win64 and depending on your hardware you need to navigate to one of these folder to run "activemq start" command

User-added image

Fire the command activemq start to start the server
User-added image

Once the server is Up, go to http://localhost:8161/admin , default credentials are admin/admin.
User-added image
Creating a Sample Queue:
Go to queues tab and enter the name of the queue and click “Create”.
User-added image

Configuring ActiveMq as Custom JMS Provider.
Create JMS connection resource, update connection factories and create a new JNDI Configuration.
Default activemq connection factories are QueueConnectionFactory and TopicConnectionFactory.
User-added image

Enter the below values for JNDI configuration.
Initial Context Factory:org.apache.activemq.jndi.ActiveMQInitialContextFactory
Naming Provider URL:tcp://localhost:61616

User-added image

Now go to Windows-->Preferences-->Directory Preference and select the folder which has
activemq-all-5.15.7 jar(You will get this Jar in ActiveMQ installed location)

User-added image
User-added image
Provide the credentials: Default ActiveMQ credentials are admin/admin

User-added image
Click Test Connection and click Yes-->Next-->Next-->Finish.
User-added image
Once Finished , you will find com.tibco.custom.jms.provider package in your project which has the
activemq-all-5.15.7.jar file and connection is established
User-added image
To run the projects with Custom JMS with select the activemq bundle from Debug/Run Configurations.
Usually it will be the first bundle under Workspace. Select it , Apply and run it.
User-added image
Sample Project logs of JMS Sender and Receiver.
User-added image
Exporting plugin project as jar and copying it to /bw/$version/system/shared will help in runtime. Please raise a case with TIBCO Support if you are stuck at any point with reference to this article.