Petals-JMS-BC

The Binding Component Petals-BC-JMS allows JMS messages to go from and to the bus.
Petals ESB supports this functionality by embedding a JMS dedicated Binding component.
In this page we describe how to set up a JMS/Active MQ example on top of Petals ESB.

Requirements:
.Petals ESB with a CDK 5.5 compliant.
.Petals-BC-JMS
.ActiveMQ Shared Library
.We need to configure the Petals-BC-JMS component with Active MQ. You can configure your Binding Component using the Petals Studio Tool. http://doc.petalslink.com/display/petalsstudio12/Configuring+the+Use+of+a+Shared+Library. The result of this operation is a patched component petals-bc-jms-3.2.0-SNAPSHOT--patched.zip

.Please make sure your shared library is compliant with the version of the installed ActiveMQueue. To do this, check that the dependency in the pom.xml is pointing to an Active MQ Core under version 5.5.1 such as:

Steps:

1. Download and install Active MQ on your machine http://activemq.apache.org/activemq-551-release.html. You can access Active MQ Web console through http://localhost:8161/admin/index.jsp
2. Start ActiveMQ. Go to the bin directory and type ./activemq start.
3.Download Petals ESB on your machine.
4.Start Petals ESB. To do this, go to the bin directory and type: java -jar server.jar start
5.Deploy the Active MQ shared library in the bus. To do this, first, compile the shared library using Maven "mvn install", then, copy the zip file that is under the target directory of the shared library in the install/ directory of Petals.
6.Deploy the petals-bc-jms-3.2.0-SNAPSHOT--patched.zip. To do this, copy the zip file into the install/ directory of Petals.
7.You need to configure the ActiveMQ server in order to make it communicate with the bus. To do this, copy the jndi.properties file in the conf directory of the activemq installation home. Make sure the address in the file is pointing to the right place, for instance: tcp://localhost:61616
8.Deploy the service unit provider and the service unit consumer on the bus.
9.On the Active MQ Web Console, create a Queue called "dynamicQueues/PetalsQueue" and a topic called "dynamicTopics/PetalsTopic. Mentioning that the queues and topics are dynamic avoids the static configuration of these in the activemq configuration file jndi.properties.

10.You can communicate with the BC-JMS by sending an XML message to the PetalsTopic. If the the use case is successful you'll receive the message on the Queue. You can verify this on the Apache ActiveMQ console.

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.