Advertisement :
   Log In    OR    Register  
  Topics :  
RMI Example

Home >>> Open Source Project Ideas >>> Mule ESB JMS Transport >>> Example Scenario
Struts Tutorials:
Struts2 Tag CheckBoxList
, Checkbox, Iterator, IF
Struts2 Tag Library Example Struts2 Tiles Example Struts2 Tiles I18N Example Struts2 Questions Struts Tiles I18N Example Struts Eclipse MVC Struts2 Tags Struts2 Example and Tutorial Struts MVC Struts2 Validation
Hibernate Tutorials: Hibernate Case Study Class Hierarchy Persist Example Using Hibernate Interceptor Hibernate Questions with Answer Hibernate Many-to-Many Mapping Example Hibernate one-to-many Mapping Example Hibernate and ORM tools Spring Hibernate Example Hibernate SessionFactory Example Hibernate Mapping Class Hierarchy Hibernate Questions Hibernate SessionFactory Questions Spring Hibernate Example: Spring Hibernate Case Study

Written By : Amit
Title :
Application development on JBoss
Description : Using Java Technology
More...


Written By : Amit
Title :
Mule ESB
Description : example applications integrated
More...


Written By : Amit
Title :
Mule ESB File Transport
Description : Example Scenario
More...


Written By : Amit
Title :
Mule ESB JMS Transport
Description : Example Scenario
More...


Written By : ISHTEK
Title :
Open For Discussion
Description : Design Following Requirements
More...

Tags/Keywords : Mule ESB, Example JMS, Mule and OpenJMS Example, Mule MS, JMS Transport, Mule Transport
Author : Amit
Date (Year/Month/Date): 2010-05-17 Using Mule as ESB and integrating two Queues from OpenJMS

Please be informed that NONE of the design/code/matter from this page is claiming to be some
sort of best practice and we DO NOT expect any of our visitor/reader of this page to assume
this as some sort of best practice for any context and should not be using this as it is
without appropriate evaluation.
This page intends only to provide bits and pieces of known ways  for doing some sort of example
and may not be fit for any other purpose.

In spite of all precautions taken to provide accurate and avoid any typo in these pages,
there might be some issues like grammatical mistakes and typo being observed in these pages,
We extend our sincerest apologies for the same.


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 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.


	
Please write your Comment on this Matter
(This will be visible if found suitable):
Name: *
Email (will not be displayed): *
Matter: *
39,10
Enter bigger number from above :*
Home >>> Open Source Project Ideas >>> Mule ESB JMS Transport >>> Example Scenario
Visitor/User referred related external URL:
(Visible upon review and approved by this site Administrator)
Referred By Name *:
Resource URL *: (e.g, URL should be starting with http://www.-----.---)
 
Resource Short Description *:
40,12
Enter bigger number from above : *

Please log in to add or reply to any matter<- requires login
Log in or Register
Copyright © 2008-2010, Interview-Questions-Tips-Forum, All Rights Reserved.
CONTACT    PRIVACY POLICY    DISCLAIMER
 

Oracle and Java are registered trademarks of Oracle and/or its affiliates.
Other names may be trademarks of their respective owners

This web site's Terms of Use and Disclaimer :

This web site provides some of the information about various technologies, example code, tips, tutorials etc. Like any printed materials,
content of these pages may become out of date over a period of time. Therefore all visitor/users of this web site are requested/advised
to refer to the originating parties/sources for the latest changes and happenings for detailed information. This information is not
intended to be a substitute for the original reference provided by the originating parties/sources. These examples with source code or
without source code, have not been thoroughly tested under all conditions. Interview-questions-tips-forum.net therefore, cannot guarantee
or imply reliability of these example source code or programs.

By accessing and using this website in any ways, including, without limitation, browsing the website pages, using any information, using
any content and/or downloading any materials, you agree to and are bound by the terms of use described in this page and Usage Terms and Conditions.
If you do not agree to all of the terms and conditions contained in the terms of use described in this page and
Usage Terms and Conditions, do not use this website in any manner. If you are using the website on behalf of your
employer, you represent that you are authorized to accept these Terms of Use on your employer's behalf.

All Trademarks are property of their respective owner. Appropriate measure is being taken for providing accurate and up-to-date
information but like any printed materials, these blog(s)/contents may eventually be outdated one day, so if you are using any of these
information, please refer original content/documentation from respective sources. And under no circumstances shall the Author of these
contents and/or this web site be liable for any loss, damage, expense incurred or suffered which is claimed to have occurred because of
usage of the contents of this web site. If you have any questions/queries/feedback/suggestions then please write to this web site owner
at contact.