Extracting Java Message Service (JMS) map message from an event payload in TIBCO BusinessEvents (BE).

Extracting Java Message Service (JMS) map message from an event payload in TIBCO BusinessEvents (BE).

book

Article ID: KB0085872

calendar_today

Updated On:

Products Versions
TIBCO BusinessEvents Enterprise Edition -
Not Applicable -

Description

Description:
Description:
==========
TIBCO BusinessEvents does support MapMessage deserialization. However, the current releases of BE only deserializes JMS MapMessage properties into event properties, not MapMessage body (the Map).

Environment:
==========

   o TIBCO BusinessEvents 3.0.x
  
   o TIBCO BusinessEvents 4.0
      
   o All OS


Resolution:
=========

There are several solutions to this.


Solution #1 :
-------------

Use the JMS Application Properties instead of the JMS Body when sending a MapMessage to BE. In this case you need to be implementing the JMS MapMessage sender processes. This approach might not be suitable if there is an existing JMS application in the system.

Solution #2 :
-------------

For a JMS MapMessage sent by other applications that use the JMS Body you can use the TIBCO ActiveMatrix BusinessWorks (BW) processes to either convert the name-value pairs in the MapMessage Body to MapMessage JMS Application Properties, or convert the MapMessage to a TextMessage or BytesMessage.


Solution #3 :
-------------

Write your own custom function to extract the fields from a map message (in binary format) that is sent from your existing JMS application.

With the attached sample project you can send a map message in binary format (BW process) by using the generated custom function Java Archive (jar) file. You can then extract the fields from the map message in your BE.


Attachments:
===========

1). CustomFunction.zip.

   This has the Java code that is used to get the mapmessage and the batch files to compile and build the custom jar file.

     a). Extract all the files in this zip file to one directory.
     b). Open the setenv.bat, CustomFuncCompile.bat and the setclasspath.bat and modify the tibco home and other TIBCO products as per your installation.
     c). Run the setclasspath.bat and CustomFuncCompile.bat scripts.
     d). Once the above batch files run with out errors and the class file is generated, you can run the buildjar.bat (make changes to the Java home) to build the jar file.

3). Once the jar file is built, move the jar file to your &ltBE install dir>/lib/ext directory. Unzip the designer project and validate it for errors and build the EAR.

4). Start the BE engine in command prompt &ltBE install dir>/bin/be-engine &ltearfile.ear>

5). From the designer tester, run the test process and you should see the message received in your be-engine.


References:
==========
For BE 3.x, refer to the TIBCO BusinessEvents Users Guide for further details on Custom Functions.

For BE 4.0, refer to the TIBCO BusinessEvents Developers Guide.

Issue/Introduction

Extracting Java Message Service (JMS) map message from an event payload in TIBCO BusinessEvents (BE).

Attachments

Extracting Java Message Service (JMS) map message from an event payload in TIBCO BusinessEvents (BE). get_app
Extracting Java Message Service (JMS) map message from an event payload in TIBCO BusinessEvents (BE). get_app