Enterprise Message Sources (EMS) is used by
applications to provide direct Java Message Service (JMS) connectivity to the
Oracle BAM Server. Each EMS connects to a specific JMS topic or queue, and the
information is delivered into a data object in the Oracle BAM Active Data
Cache.
In this Post I will explain you step by step
process to configure EMS in BAM.
Step 1: First we need to have JMS queue. So
let’s create a JMS queue first.
Go To EM console http://host:port/em
Go To services -> Messaging -> JMS Module
-> Choose module under which you want to create JMS Queue(SOAJMSModule)
-> New -> Choose Queue
- Let’s create one queue with name BamQueueTestingQueue Name- BamQueueTestingJNDI – jms/ BamQueueTesting
Step 2: Now create a new connection Factory.
Go To services -> Messaging -> JMS Module
-> Choose module under which you want to create JMS Queue(SOAJMSModule)
-> New -> Choose “Connection Factory”
- Enter following values for Connection Factory.Name – BamQueueTestingCFJNDI – jms/BamQueueTestingCF
Step 3: Now we will configure EMS in BAM, but
before that we need to have Data Object in Bam, so let’s first create Data
Object. Go through my Previous
Post that explains how to create Data
Object in BAM.
We created “BamQueueDataObject” in BAM having
below fields.
o Name
o ID
o Address
o Marks
o MaxMarks
Step 4: Now Configure EMS.
Choose “Enterprise Message Source” from drop
down list and click on create button.
- Now we need to fill following details.
- Start entering following detailso Name- BamTestQueue (It can be anything as per your requirement and naming standards)o Intial Context Factory- weblogic.jndi.WLInitialContextFactory (Leave it as default)o JNDI Server Provider URL – t3://host:port (t3://localhost:8001)Since we created the JMS queue which is targeted to SOA server, so here soa server port will come.o Queue Connection Factory Name- jms/BamQueueTestingCF (JNDI of Connection Factory)o Queue Name – jms/BamQueueTesting (JNDI of Queue)o Data Object Name – Click on Browse and choose the DO which we created earlier.o Operation - Insert
- Now we will map message in the Queue to Data Object. We will get following message in JMS Queue.<?xml version="1.0" encoding="UTF-8" ?><process xmlns:client="http://xmlns.oracle.com/TestApplication_jws/BamQueuTesting/BamQueue" xmlns="http://xmlns.oracle.com/TestApplication_jws/BamQueuTesting/BamQueue"><client:Name>test</client:Name><client:ID>89</client:ID><client:Address>mumba</client:Address><client:Marks>99</client:Marks><client:MaxMarks>100</client:MaxMarks></process>o Message Element Name – process (This is root element of the message that we will get in JMS Queue)o Check “Namespace Qualified”o Namespace URI - http://xmlns.oracle.com/TestApplication_jws/BamQueuTesting/BamQueueo Check “Element Tag” as we need to map need Elements in Message in JMS queue to fields in Data Object.
Step 4: Now we are ready for testing. Start the
EMS that we created just now and put one message in Queue.
Message in Queue.
<?xml version="1.0"
encoding="UTF-8" ?>
<process
xmlns:client="http://xmlns.oracle.com/TestApplication_jws/BamQueuTesting/BamQueue"
xmlns="http://xmlns.oracle.com/TestApplication_jws/BamQueuTesting/BamQueue">
<client:Name>test</client:Name>
<client:ID>89</client:ID>
<client:Address>mumba</client:Address>
<client:Marks>99</client:Marks>
<client:MaxMarks>100</client:MaxMarks>
</process>
You can see same data in Data Object.
o Start
mapping Data Object fields.
o Check
“Log faulted Message” in case you need to log the message if any error occurs.
Go Through my previous post which explain how
to create Data Object In BAM.
Vivek, How to use JMS Topic in BAM? In your post I think we are using JMS Queue.
ReplyDelete