Home >> Miscellaneous
>> Mule-ESB-JMS-Transport
Using Mule as ESB and trying to integrate two queues
of some JMS Server.
In this example I shall be exploring a very simple example
whereby I shall use Open Source JMS server and create two
JMS Queues.
These Two JMS Queues will be integrated so that if any message
falls in one of the Queue, then automatically this message
will be send to the other JMS Queue, and all these will
happen through use of Mule Standalone version 2.2.1 as
the ESB for this example.
I have used OpenJMS (openjms-0.7.7-beta-1) as the JMS server
for this example.
|
|  |
|
By executing %OPEN_JMS%/bin/admin.bat , there open up an admin
screen, from this screen, the JMS server can be started by
selecting Actions->Start OpenJMS
Once the OpenJMS server is successfully started.. then this
admin screen can be connected to see all the topics , queues
created by default, by selecting Actions->Connections->Online
In this example I shall be using queue3 and queue1 (comes along
with the default setting for OpenJMS) to be defined as inbound
and outbound endpoints respectively for the Local Mule Setup.
For Mule Standalone server to start, I have to provide my example
configuration file, that is "sample-config.xml", as shown below:
sample-config.xml
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesource.org/schema/mule/core/2.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:file="http://www.mulesource.org/schema/mule/file/2.2"
xmlns:jms="http://www.mulesource.org/schema/mule/jms/2.2"
xsi:schemaLocation="
http://www.mulesource.org/schema/mule/core/2.2
http://www.mulesource.org/schema/mule/core/2.2/mule.xsd
http://www.mulesource.org/schema/mule/jms/2.2
http://www.mulesource.org/schema/mule/jms/2.2/mule-jms.xsd" >
<description>
Integrating two JMS queues using Mule, an example
</description>
<configuration>
<default-threading-profile maxThreadsActive="1"
doThreading="false" maxBufferSize="1"/>
</configuration>
<jms:connector name="openJmsConn" maxRedelivery="1"
jndiInitialFactory="org.exolab.jms.jndi.InitialContextFactory"
jndiProviderUrl="tcp://localhost:3035"
connectionFactoryJndiName="ConnectionFactory" jndiDestinations="true"
numberOfConsumers="2" disableTemporaryReplyToDestinations="true"
cacheJmsSessions="true"/>
<model name="sampleExample">
<service name="sampleService">
<inbound>
<jms:inbound-endpoint queue="queue3"/>
</inbound>
<outbound>
<pass-through-router>
<jms:outbound-endpoint queue="queue1"/>
</pass-through-router>
</outbound>
</service>
</model>
</mule>
|
Before starting this example, and as this example uses OpenJMS,
there is a need for providing all the required JAR files from OpenJMS
to the Mule Standalone version 2.2.1, I have done this by having
most of the OpenJMS jar files from the LIB folder, made available
in the %MULE_HOME%\lib\opt directory.
Now the Mule server is started using a command line as follows:
mule -config <<example_directory>>/sample-config.xml
Once Mule server (locally) started successfully.. then time came to
test this configuration setting by sending a sample message to
queue3 (defined in OpenJMS server), for this I used the default example
from OpenJMS distribution itself,
The Sender application, and passed arguments as asked for for sending
message to the destination (queue3).
As and when the JMS message is reached queue3, it just gets moved
to the queue1 as the outbound endpoint defined in Mule Community
Server locally setup.
This made me realize a point as how easy to use and powerful can be Mule ESB server.
If you have any questions, please let me know and I shall try to
answer your questions, as much as possible.
If anything missed out , please let me know at
techienjoy at yahoo . com
|
|
|
| Android ListView Example : |
Example on Android ListView and
explained with a very simple scenario
and article with appropriate screens
captured and shown.
|
|
|
|
|
|
| Android Sensors Example : |
Example on Android Sensors Listed and
explained with a very simple scenario
and article with appropriate screens
captured and shown.
|
|
| Android Draw Example : |
Example using Draw using Android Platform
and source code implementing this example.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Android ListView Example : |
Example on Android ListView
explained with a very simple scenario
whereby showing folder and files with
structure and appropriate screens
captured and shown.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Android Tab View Example : |
Example on Android Tab View
explained with a very simple scenario
and appropriate screens captured and shown.
|
|
|
|
|
|
|
|
|
|
|
|
| Android Canvas Example : |
Example using Canvas using Android Platform
and source code implementing this example.
|
|
|
|
|
|
|
|
| Android ListView Example : |
Example on Android List View
explained with a very simple scenario
and article with appropriate screens
captured and shown.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Android Gallery Example : |
Example on Android Gallery View
explained with a very simple scenario
and appropriate screens captured and shown.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Android Intent Example : |
Example using Intent from Android Platform
and source code implementing this example.
|
|
|
|
|
|
|
|
|
|
| Google GWT Example : |
Example using GWT and some design patterns and various
ways of implementing this example.
|
|
|
|
|
|
|
|
|
|
| Android Examples : |
List of ANDROid examples
with source code and output
screens captured and shown.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Android NFC Example : |
Example using NFC using Android Platform
and source code implementing this example.
|
|
|
|
|
| Android GridView Example : |
Example using GridView Widget using Android Platform
and source code implementing this example.
|
|
|
|
|
|
| Android Robots Example : |
Example using Borots using Android Platform
and source code implementing this example.
|
|
|
| Android Views Example : |
Example using Views using Android Platform
and source code implementing this example.
|
|
|
|
|
|