<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-9094589327053503491</id><updated>2012-01-25T06:59:33.872-08:00</updated><title type='text'>JBoss SOA Platform</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://jboss-soa-p.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://jboss-soa-p.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Mark Little</name><uri>http://www.blogger.com/profile/15072917010265365428</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>26</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-9094589327053503491.post-7307719149176164509</id><published>2012-01-25T06:09:00.000-08:00</published><updated>2012-01-25T06:59:33.887-08:00</updated><title type='text'>The JBoss ESB Beginner's Guide is officially published today!</title><content type='html'>&lt;br /&gt;It's available at Packt now! &lt;a href="http://www.packtpub.com/jboss-esb-beginners-guide/book"&gt;http://www.packtpub.com/jboss-esb-beginners-guide/book&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;And at Amazon: &lt;a href="http://www.amazon.com/JBoss-ESB-Beginners-Guide-DiMaggio/dp/1849516588/"&gt;http://www.amazon.com/JBoss-ESB-Beginners-Guide-DiMaggio/dp/1849516588/&amp;nbsp;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-fNJv5MO0HzA/TyALeZSbb8I/AAAAAAAAHeU/xZTbGIqvRok/s1600/JBossESBBookCover.jpg" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://4.bp.blogspot.com/-fNJv5MO0HzA/TyALeZSbb8I/AAAAAAAAHeU/xZTbGIqvRok/s320/JBossESBBookCover.jpg" width="259" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;A review of the book is here:&amp;nbsp; &lt;a href="http://rickwagner.blogspot.com/2011/10/book-review-for-jboss-esb-beginners.html"&gt;http://rickwagner.blogspot.com/2011/10/book-review-for-jboss-esb-beginners.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9094589327053503491-7307719149176164509?l=jboss-soa-p.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jboss-soa-p.blogspot.com/feeds/7307719149176164509/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9094589327053503491&amp;postID=7307719149176164509' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/7307719149176164509'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/7307719149176164509'/><link rel='alternate' type='text/html' href='http://jboss-soa-p.blogspot.com/2012/01/jboss-esb-beginners-guide-is-officially.html' title='The JBoss ESB Beginner&apos;s Guide is officially published today!'/><author><name>Len DiMaggio</name><uri>http://www.blogger.com/profile/07124585546929851174</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='20' src='http://1.bp.blogspot.com/_Wad47xG7w3A/Sc7b75epEEI/AAAAAAAAAQ4/F9-h0znUI7w/S220/Boston.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-fNJv5MO0HzA/TyALeZSbb8I/AAAAAAAAHeU/xZTbGIqvRok/s72-c/JBossESBBookCover.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9094589327053503491.post-4885964188866794057</id><published>2011-01-17T09:01:00.001-08:00</published><updated>2011-01-17T09:01:10.184-08:00</updated><title type='text'>The JBossESB-Smooks Integration in the SOA Platform Post - now on DZone</title><content type='html'>And - DZone just picked up that last post too: &lt;br /&gt;&lt;br /&gt;&lt;a href="http://java.dzone.com/articles/jbossesb-smooks-integration"&gt;http://java.dzone.com/articles/jbossesb-smooks-integration&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9094589327053503491-4885964188866794057?l=jboss-soa-p.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jboss-soa-p.blogspot.com/feeds/4885964188866794057/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9094589327053503491&amp;postID=4885964188866794057' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/4885964188866794057'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/4885964188866794057'/><link rel='alternate' type='text/html' href='http://jboss-soa-p.blogspot.com/2011/01/jbossesb-smooks-integration-in-soa_17.html' title='The JBossESB-Smooks Integration in the SOA Platform Post - now on DZone'/><author><name>Len DiMaggio</name><uri>http://www.blogger.com/profile/07124585546929851174</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='20' src='http://1.bp.blogspot.com/_Wad47xG7w3A/Sc7b75epEEI/AAAAAAAAAQ4/F9-h0znUI7w/S220/Boston.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9094589327053503491.post-5336630672700041448</id><published>2011-01-12T15:04:00.000-08:00</published><updated>2011-01-12T15:04:23.722-08:00</updated><title type='text'>The JBossESB-Smooks Integration in the SOA Platform</title><content type='html'>One of the great strengths of the SOA Platform is its wealth of software integrations. In this post, we'll examine the JBoss ESB - Smooks integration in the SOA Platform and how it can be used to perform two of the primary operations or an ESB; message transformations and message routing:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Message transformation&lt;/b&gt; enables the JBossESB to translate message payloads (the message body plus attachments and properties) from one form to another so that the message can be processed by different services. &lt;/li&gt;&lt;li&gt;&lt;b&gt;Message routing&lt;/b&gt; enables the JBossESB to move messages to files, to JMS assets such as queues, and over the ESB "bus" between services.&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;A 30-Second Introduction to Smooks&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;It's common to refer to Smooks as a transformation engine, but that's not the full story. Smooks is really a more general purpose processing framework that is capable of dealing with with fragments of a message. Smooks accomplishes this with "visitor logic", where a "visitor" is Java code that performs a specific action on a specific fragment of a message. This enables Smooks to perform different actions on different fragments of messages. As is stated by the Smooks project (&lt;a href="http://www.smooks.org/mediawiki/index.php?title=Why_Smooks_was_Created"&gt;http://www.smooks.org/mediawiki/index.php?title=Why_Smooks_was_Created&lt;/a&gt;):&lt;br /&gt;&lt;br /&gt;Smooks supports these types of message fragment processing:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Templating&lt;/b&gt;: Transform message fragments with XSLT or FreeMarker&lt;/li&gt;&lt;li&gt;&lt;b&gt;Java Binding&lt;/b&gt;: Bind message fragment data into Java objects&lt;/li&gt;&lt;li&gt;&lt;b&gt;Splitting&lt;/b&gt;: Split messages fragments and rout the split fragments over multiple transports and destinations&lt;/li&gt;&lt;li&gt;&lt;b&gt;Enrichment&lt;/b&gt;: "Enrich" message fragments with data from databases&lt;/li&gt;&lt;li&gt;&lt;b&gt;Persistence&lt;/b&gt;: Persist message fragment data to databases&lt;/li&gt;&lt;li&gt;&lt;b&gt;Validation&lt;/b&gt;: Perform basic or complex validation on message fragment data&lt;/li&gt;&lt;/ul&gt;The SOA Platform SmooksAction out-of-the-box action provides you access to all these Smooks capabilities.&lt;br /&gt;&lt;br /&gt;The JBossESB implements several out of the box actions to support message transformation and routing. SmooksAction (org.jboss.soa.esb.smooks.SmooksAction) enables you to use a powerful set of Smooks operations within the SOA Platform. Transformations are probably the first type of operation that you think of with Smooks, but with the SmooksAction you can also make use of Smooks operations such as splitting and routing message payloads.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;A Simple Transformation with Smooks&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Let's look at a very simple example, the aptly named "transform_XML2XML_simple" quickstart. This quickstart performs a message transformation by applying an XSLT (EXtensible Stylesheet Language Transformations) to an XML message. The message is transformed into XML in a different form. The interesting parts of the quickstart's jboss-esb.xml file are:&lt;br /&gt;&lt;pre style="background: url(&amp;quot;http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif&amp;quot;) repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;1:  &amp;lt;actions mep="OneWay"&amp;gt;  &lt;br /&gt;2:  &amp;lt;action class="org.jboss.soa.esb.actions.SystemPrintln" name="print-before"&amp;gt;  &lt;br /&gt;3:  &amp;lt;property name="message" value="[transform_XML2XML_simple] Message before transformation"&amp;gt;  &lt;br /&gt;4:  &amp;lt;/property&amp;gt;  &lt;br /&gt;5:  &amp;lt;action class="org.jboss.soa.esb.smooks.SmooksAction" name="simple-transform"&amp;gt;  &lt;br /&gt;6:  &amp;lt;property name="smooksConfig" value="/smooks-res.xml"&amp;gt;  &lt;br /&gt;7:  &amp;lt;property name="reportPath" value="/tmp/smooks_report.html"&amp;gt;  &lt;br /&gt;8:  &amp;lt;/property&amp;gt;  &lt;br /&gt;9:  &amp;lt;action class="org.jboss.soa.esb.actions.SystemPrintln" name="print-after"&amp;gt;  &lt;br /&gt;10: &amp;lt;property name="message" value="[transform_XML2XML_simple] Message after transformation"&amp;gt;  &lt;br /&gt;11: &amp;lt;/property&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;&lt;li&gt;Line 1: This line is not specific to transformations, but it's worth mentioning. "mep" stands for "message exchange pattern." The pattern used by this quickstart is "one-way" in that the requester invokes a service (by sending it a message) and then does not wait for a response. &lt;/li&gt;&lt;li&gt;Lines 2-4, 9-24: These lines simply cause the message to be written to the server log before and after its transformation. (org.jboss.soa.esb.actions.SystemPrintln, is, incidentally, the only out-of-the-box action in the Miscellaneous action group.) &lt;/li&gt;&lt;li&gt;Line 5: Here's where we specify that we want to invoke a SmooksAction &lt;/li&gt;&lt;li&gt;Line 6: And here is the XSLT that will be executed. We'll examine this file in a moment. &lt;/li&gt;&lt;li&gt;Line 7: This line is actually not in the quickstart. I've added the reportPath property it so that we can review the resulting report. Note that generating this report does require some processing resources, so it should not be used in production environments. See below for screen-shots of this report. &lt;/li&gt;&lt;/ul&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_Wad47xG7w3A/TS0iA_QVu3I/AAAAAAAADNc/tQL8iAMLA0c/s1600/Screenshot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="250" src="http://3.bp.blogspot.com/_Wad47xG7w3A/TS0iA_QVu3I/AAAAAAAADNc/tQL8iAMLA0c/s400/Screenshot.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_Wad47xG7w3A/TS0iEt8tAVI/AAAAAAAADNg/Im7WU0VFUE4/s1600/Screenshot-1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="250" src="http://4.bp.blogspot.com/_Wad47xG7w3A/TS0iEt8tAVI/AAAAAAAADNg/Im7WU0VFUE4/s400/Screenshot-1.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Now, let's look at smooks-res.xml:&lt;br /&gt;&lt;pre style="background: url(&amp;quot;http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif&amp;quot;) repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;1:  &amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;  &lt;br /&gt;2:  &amp;lt;smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.0.xsd"&amp;gt;  &lt;br /&gt;3:    &lt;br /&gt;4:  &amp;lt;resource-config selector="OrderLine"&amp;gt;  &lt;br /&gt;5:  &amp;lt;resource type="xsl"&amp;gt;  &lt;br /&gt;6:  &amp;lt;![CDATA[&amp;lt;line-item&amp;gt;  &lt;br /&gt;7:  &amp;lt;product&amp;gt;&amp;lt;xsl:value-of select="./Product/@productId" /&amp;gt;&amp;lt;/product&amp;gt;  &lt;br /&gt;8:  &amp;lt;price&amp;gt;&amp;lt;xsl:value-of select="./Product/@price" /&amp;gt;&amp;lt;/price&amp;gt;  &lt;br /&gt;9:  &amp;lt;quantity&amp;gt;&amp;lt;xsl:value-of select="@quantity" /&amp;gt;&amp;lt;/quantity&amp;gt;  &lt;br /&gt;10:  &amp;lt;/line-item&amp;gt;]]&amp;gt;  &lt;br /&gt;11:  &amp;lt;/resource&amp;gt;  &lt;br /&gt;12:  &amp;lt;param name="is-xslt-templatelet"&amp;gt;true&amp;lt;/param&amp;gt;  &lt;br /&gt;13:  &amp;lt;/resource-config&amp;gt;  &lt;br /&gt;14:  &amp;lt;/smooks-resource-list&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Line 2: The namespace referenced here is the Smooks XML Schema Definition &lt;/li&gt;&lt;li&gt;Line 4: The resource-config element corresponds to an org.milyn.cdr.SmooksResourceConfiguration object[11] &lt;/li&gt;&lt;li&gt;Lines 7-9: These XPath (XML Path Language) statements locate the Product element's productId and price attributes and the OrderLine element's quantity attributes. XPath is used by XSLT to find or reference data in XML documents.&lt;/li&gt;&lt;/ul&gt;When you run this quickstart, you'll see the XML message as defined in SampleOrder.xml displayed before and after it undergoes the XSLT transformation.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Content Based Routing with Smooks&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The routing of data from one place to another is one of the most basic, and common, problems facing any networked software application. This routing can take many forms, such as email being sent to the correct recipient or network traffic being routed around the globe based on system names defined in DNS. In the context of an Enterprise Service Bus such as the JBossESB in the SOA Platform, where everything is either a message or a service, routing means getting messages delivered to the correct services.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;JBossESB Routing Choices&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The JBossESB supports multiple actions to route messages to services right out of the box (&lt;a href="http://jboss-soa-p.blogspot.com/2009/09/works-great-right-out-of-box.html"&gt;http://jboss-soa-p.blogspot.com/2009/09/works-great-right-out-of-box.html&lt;/a&gt;) such as:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;HttpRouter&lt;/b&gt; (org.jboss.soa.esb.actions.routing.HttpRouter) - The HttpRouter routes the incoming message to a URL that you specify in the action definition. &lt;/li&gt;&lt;li&gt;&lt;b&gt;JMSRouter&lt;/b&gt; (org.jboss.soa.esb.actions.routing.JMSRouter) - This action routes the incoming message to JMS. For example, to a JMS queue where a service can then retrieve the message asynchronously. In order to find the correct JMS queue or topic, you specify values for properties such as jndi-name, initial-context-factory, and jndi-URL in the action definition. &lt;/li&gt;&lt;li&gt;&lt;b&gt;StaticRouter&lt;/b&gt; (org.jboss.soa.esb.actions.StaticRouter) - As its name implies, this router establishes static routes that do not change based on the content of the messages or a set of routing rules. &lt;/li&gt;&lt;li&gt;&lt;b&gt;StaticWiretap&lt;/b&gt; (org.jboss.soa.esb.actions.StaticWiretap) - Maybe it's the comic book fan in me, but this is my favorite name for an action. There's something film noir-ish about a "wiretap." You can almost imagine Humphrey Bogart sitting it the back room of a bar listening in on a wiretapped SOA action. (On black and white film, of course.) In practice, it's not all that exciting. This action implements the Enterprise Integration Pattern for a wiretap (&lt;a href="http://www.eaipatterns.com/WireTap.html"&gt;http://www.eaipatterns.com/WireTap.html&lt;/a&gt;). The goal of a wiretap is to inspect each message, without affecting the operation of the action chain. This can be a useful action to use to aid in debugging a service.&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;JBossESB and Contest Based Routing&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;These are all very useful, but they are also all static in nature in that once you define the path for the messages, that's the path that the messages always take. For example, a static path could be used so that messages from the sales department service are always sent to the warehouse inventory control service. But, what if you had several warehouses each of which stored a different set of products? And what if you wanted to be able to vary the route of the messages dynamically? For example, what if you want the route the message takes to be based on the actual content in the message? Well, the JBossESB also supports multiple types of content based routing (CBR).&lt;br /&gt;&lt;br /&gt;Two relatively lightweight approaches (&lt;a href="http://jbossesb.blogspot.com/2009/10/content-based-routing-in-jbossesb-just.html"&gt;http://jbossesb.blogspot.com/2009/10/content-based-routing-in-jbossesb-just.html&lt;/a&gt;) for content based routing are supported:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;XPath Content Based Routing&lt;/b&gt; - Note that this is completely defined in the jboss-esb.xml file. No additional configuration files are needed. &lt;/li&gt;&lt;li&gt;&lt;b&gt;Regex Content Based Routing&lt;/b&gt; - An external configuration file is used to define XPath expressions that govern the routing.&lt;/li&gt;&lt;/ul&gt;Now, if you are dealing with a more complex set of routing "rules," the JBossESB supports using JBoss Rules (&lt;a href="http://jboss-soa-p.blogspot.com/2009/07/when-content-knows-way-content-based.html"&gt;http://jboss-soa-p.blogspot.com/2009/07/when-content-knows-way-content-based.html&lt;/a&gt;) to define the routing rules. Rules provides you with the rich feature set of JBoss Drools to control the dynamic routing of messages based on their content. JBoss Drools is a complete enterprise platform for rules-based application development, workflow, administration, and event processing. It also provides an integration with JBossESB to support content based routing. You define the content based routing algorithm in a set of rules.&lt;br /&gt;&lt;br /&gt;But wait - there's more.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Content Based Routing with Smooks&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;You might think of JBoss Smooks (&lt;a href="http://www.smooks.org/"&gt;http://www.smooks.org/&lt;/a&gt;) as primarily a tool for performing XML transformations (for example, for transforming data from CSV to XML), but it can also be used for content based routing on the JBossESB in the SOA Platform. Some of the things that Smooks allows you to do with content based routing are:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Splitting of messages&lt;/b&gt; - Don't just route the whole message, but split out the parts of the message, say sales order items and route them to separate services.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Even more complex splitting of messages&lt;/b&gt; - For example, split out those sales order items and then combine each of them with data from other parts of the message (say, customer informatin) before performing the message routing.&amp;nbsp; This is more than just basic message fragment extraction, as the extracted data can be combined or otherwise processed. &lt;/li&gt;&lt;li&gt;&lt;b&gt;Routing split message fragments in multiple formats&lt;/b&gt; - For example, routing XML to one service, Java to another, CSV data to still another. &lt;/li&gt;&lt;li&gt;&lt;b&gt;Fast performance&lt;/b&gt; - Smooks is able to perform all the message splitting and routing (even for multiple destinations and multiple formats) in a single filtering pass of the message. This makes for fast performance as there is no need to evaluate multiple XPaths multile times on the same message. Smooks is also able to handle big (make that REALLY BIG as in &amp;gt; 50MB)&amp;nbsp; messages efficiently. &lt;/li&gt;&lt;li&gt;&lt;b&gt;Complex conditionals&lt;/b&gt; - Smooks is not limited to just the conditionals that XPath supports.&lt;/li&gt;&lt;/ul&gt;The best way to understand and appreciate the advantages and flexibility of content based routing on the JBossESB with Smooks is to see it in action. Note that we'll be following a programming tradition as we'll take a quickstart as starting point, and expand it to fulfill our requirements.&lt;br /&gt;&lt;br /&gt;The quickstart is named: smooks_file_splitter_router&lt;br /&gt;&lt;br /&gt;Now, as the quickstart's name indicates, its objective is to demonstrate both splitting files and routing messages. The quickstart's "Splitter" service makes use of a File Gateway. Its file system listener ("fs-listener") uses the Smooks org.jboss.soa.esb.smooks.splitting.FileStreamSplitter to split an incoming XML message and route message fragments to the "Receiver" service.&lt;br /&gt;&lt;br /&gt;Let's take a closer look at how this works, and then we'll expand on the quickstart to perform some additional content based routing.&lt;br /&gt;&lt;br /&gt;The quickstart is initiated by the "runtest" ant target. This invokes the org.jboss.soa.esb.sample.quickstart.smooksfilesplitterrouter.InputOrderGenerator class which creates the "SampleOrder.xml" file for the File Gateway. SampleOrder.xml contains multiple orders and follows this form:&lt;br /&gt;&lt;pre style="background: url(&amp;quot;http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif&amp;quot;) repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;1:  &amp;lt;order id="332"&amp;gt;  &lt;br /&gt;2:  &amp;lt;header&amp;gt;  &lt;br /&gt;3:  &amp;lt;customer number="123"&amp;gt;Joe&amp;lt;/customer&amp;gt;  &lt;br /&gt;4:  &amp;lt;/header&amp;gt;  &lt;br /&gt;5:  &amp;lt;order-items&amp;gt;  &lt;br /&gt;6:  &amp;lt;order-item id="1"&amp;gt;  &lt;br /&gt;7:  &amp;lt;product&amp;gt;1&amp;lt;/product&amp;gt;  &lt;br /&gt;8:  &amp;lt;quantity&amp;gt;2&amp;lt;/quantity&amp;gt;  &lt;br /&gt;9:  &amp;lt;price&amp;gt;8.80&amp;lt;/price&amp;gt;  &lt;br /&gt;10:  &amp;lt;/order-item&amp;gt;  &lt;br /&gt;11:  &amp;lt;order-item id="2"&amp;gt;  &lt;br /&gt;12:  &amp;lt;product&amp;gt;2&amp;lt;/product&amp;gt;  &lt;br /&gt;13:  &amp;lt;quantity&amp;gt;2&amp;lt;/quantity&amp;gt;  &lt;br /&gt;14:  &amp;lt;price&amp;gt;8.80&amp;lt;/price&amp;gt;  &lt;br /&gt;15:  &amp;lt;/order-item&amp;gt;  &lt;br /&gt;16:  &amp;lt;order-item id="3"&amp;gt;  &lt;br /&gt;17:  &amp;lt;product&amp;gt;3&amp;lt;/product&amp;gt;  &lt;br /&gt;18:  &amp;lt;quantity&amp;gt;2&amp;lt;/quantity&amp;gt;  &lt;br /&gt;19:  &amp;lt;price&amp;gt;8.80&amp;lt;/price&amp;gt;  &lt;br /&gt;20:  &amp;lt;/order-item&amp;gt;  &lt;br /&gt;21:  &amp;lt;order-item id="4"&amp;gt;  &lt;br /&gt;22:  &amp;lt;product&amp;gt;4&amp;lt;/product&amp;gt;  &lt;br /&gt;23:  &amp;lt;quantity&amp;gt;2&amp;lt;/quantity&amp;gt;  &lt;br /&gt;24:  &amp;lt;price&amp;gt;8.80&amp;lt;/price&amp;gt;  &lt;br /&gt;25:  &amp;lt;/order-item&amp;gt;  &lt;br /&gt;26:  &amp;lt;order-item id="5"&amp;gt;  &lt;br /&gt;27:  &amp;lt;product&amp;gt;5&amp;lt;/product&amp;gt;  &lt;br /&gt;28:  &amp;lt;quantity&amp;gt;2&amp;lt;/quantity&amp;gt;  &lt;br /&gt;29:  &amp;lt;price&amp;gt;8.80&amp;lt;/price&amp;gt;  &lt;br /&gt;30:  &amp;lt;/order-item&amp;gt;  &lt;br /&gt;31:  &amp;lt;order-item id="6"&amp;gt;  &lt;br /&gt;32:  &amp;lt;product&amp;gt;6&amp;lt;/product&amp;gt;  &lt;br /&gt;33:  &amp;lt;quantity&amp;gt;2&amp;lt;/quantity&amp;gt;  &lt;br /&gt;34:  &amp;lt;price&amp;gt;8.80&amp;lt;/price&amp;gt;  &lt;br /&gt;35:  &amp;lt;/order-item&amp;gt;  &lt;br /&gt;36:  &amp;lt;order-item id="7"&amp;gt;  &lt;br /&gt;37:  &amp;lt;product&amp;gt;7&amp;lt;/product&amp;gt;  &lt;br /&gt;38:  &amp;lt;quantity&amp;gt;2&amp;lt;/quantity&amp;gt;  &lt;br /&gt;39:  &amp;lt;price&amp;gt;8.80&amp;lt;/price&amp;gt;  &lt;br /&gt;40:  &amp;lt;/order-item&amp;gt;  &lt;br /&gt;41:  &amp;lt;order-item id="8"&amp;gt;  &lt;br /&gt;42:  &amp;lt;product&amp;gt;8&amp;lt;/product&amp;gt;  &lt;br /&gt;43:  &amp;lt;quantity&amp;gt;2&amp;lt;/quantity&amp;gt;  &lt;br /&gt;44:  &amp;lt;price&amp;gt;8.80&amp;lt;/price&amp;gt;  &lt;br /&gt;45:  &amp;lt;/order-item&amp;gt;  &lt;br /&gt;46:  &amp;lt;order-item id="9"&amp;gt;  &lt;br /&gt;47:  &amp;lt;product&amp;gt;9&amp;lt;/product&amp;gt;  &lt;br /&gt;48:  &amp;lt;quantity&amp;gt;2&amp;lt;/quantity&amp;gt;  &lt;br /&gt;49:  &amp;lt;price&amp;gt;8.80&amp;lt;/price&amp;gt;  &lt;br /&gt;50:  &amp;lt;/order-item&amp;gt;  &lt;br /&gt;51:  &amp;lt;/order-items&amp;gt;  &lt;br /&gt;52:  &amp;lt;/order&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;The best way to understand the operation of the quickstart is to take a closer look at the providers and services defined in the jboss-esb.xml file. Note that in the case of this quickstart, jboss-esb.xml is actually generated from jboss-esb-unfiltered.xml at run time to include environment specific information such as directory names. Here's jboss-esb-unfiltered.xml:&lt;br /&gt;&lt;pre style="background: url(&amp;quot;http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif&amp;quot;) repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;1:  &amp;lt;?xml version = "1.0" encoding = "UTF-8"?&amp;gt;  &lt;br /&gt;2:  &amp;lt;jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.1.0.xsd"  &lt;br /&gt;3:    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  &lt;br /&gt;4:    xsi:schemaLocation="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.1.0.xsd http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.1.0.xsd"  &lt;br /&gt;5:    parameterReloadSecs="5"&amp;gt;  &lt;br /&gt;6:     &lt;br /&gt;7:    &amp;lt;providers&amp;gt;  &lt;br /&gt;8:        &amp;lt;fs-provider name="FSprovider1"&amp;gt;  &lt;br /&gt;9:            &amp;lt;fs-bus busid="smooksFileChannel"&amp;gt;  &lt;br /&gt;10:                &amp;lt;fs-message-filter  &lt;br /&gt;11:                    directory="@INPUTDIR@"  &lt;br /&gt;12:                    input-suffix=".xml"  &lt;br /&gt;13:                    work-suffix=".esbWorking"  &lt;br /&gt;14:                    post-delete="true"  &lt;br /&gt;15:                    post-directory="@OUTPUTDIR@"  &lt;br /&gt;16:                    post-suffix=".sentToEsb"  &lt;br /&gt;17:                    error-delete="false"  &lt;br /&gt;18:                    error-directory="@ERRORDIR@"  &lt;br /&gt;19:                    error-suffix=".IN_ERROR"  &lt;br /&gt;20:                  /&amp;gt;  &lt;br /&gt;21:            &amp;lt;/fs-bus&amp;gt;  &lt;br /&gt;22:        &amp;lt;/fs-provider&amp;gt;  &lt;br /&gt;23:    &lt;br /&gt;24:    &amp;lt;/providers&amp;gt;  &lt;br /&gt;25:    &lt;br /&gt;26:    &amp;lt;services&amp;gt;  &lt;br /&gt;27:    &lt;br /&gt;28:      &amp;lt;!--  &lt;br /&gt;29:          Splitter Service...  &lt;br /&gt;30:      --&amp;gt;  &lt;br /&gt;31:      &amp;lt;service category="QS" name="Splitter" description="Splitter Service" invmScope="GLOBAL"&amp;gt;  &lt;br /&gt;32:          &amp;lt;listeners&amp;gt;  &lt;br /&gt;33:          &amp;lt;!-- Splitting the message at the gateway via the FileStreamSplitter composer class allows us to  &lt;br /&gt;34:                   handle huge messages... --&amp;gt;  &lt;br /&gt;35:              &amp;lt;fs-listener name="FileGateway" busidref="smooksFileChannel" is-gateway="true" schedule-frequency="2"&amp;gt;  &lt;br /&gt;36:                  &amp;lt;property name="composer-class" value="org.jboss.soa.esb.smooks.splitting.FileStreamSplitter"/&amp;gt;  &lt;br /&gt;37:                  &amp;lt;property name="splitterConfig" value="/smooks-config.xml"/&amp;gt;  &lt;br /&gt;38:              &amp;lt;/fs-listener&amp;gt;  &lt;br /&gt;39:          &amp;lt;/listeners&amp;gt;  &lt;br /&gt;40:          &amp;lt;actions mep="OneWay"&amp;gt;  &lt;br /&gt;41:              &amp;lt;action name="print" class="org.jboss.soa.esb.actions.SystemPrintln"&amp;gt;  &lt;br /&gt;42:                  &amp;lt;property name="message" value="[Splitter] Message Split complete"/&amp;gt;  &lt;br /&gt;43:              &amp;lt;/action&amp;gt;  &lt;br /&gt;44:       &lt;br /&gt;45:              &amp;lt;!-- The next action is for Continuous Integration testing --&amp;gt;  &lt;br /&gt;46:              &amp;lt;action name="testStore" class="org.jboss.soa.esb.actions.TestMessageStore"/&amp;gt;  &lt;br /&gt;47:          &amp;lt;/actions&amp;gt;  &lt;br /&gt;48:      &amp;lt;/service&amp;gt;  &lt;br /&gt;49:        &lt;br /&gt;50:      &amp;lt;!--  &lt;br /&gt;51:          Receiver Service...  &lt;br /&gt;52:      --&amp;gt;  &lt;br /&gt;53:      &amp;lt;service category="QS" name="Receiver" description="Receiver Service" invmScope="GLOBAL"&amp;gt;  &lt;br /&gt;54:          &amp;lt;actions mep="OneWay"&amp;gt;  &lt;br /&gt;55:              &amp;lt;action name="print" class="org.jboss.soa.esb.actions.SystemPrintln"&amp;gt;  &lt;br /&gt;56:                  &amp;lt;property name="message" value="[Receiver] Message Fragment Received"/&amp;gt;  &lt;br /&gt;57:              &amp;lt;/action&amp;gt;  &lt;br /&gt;58:          &amp;lt;/actions&amp;gt;  &lt;br /&gt;59:      &amp;lt;/service&amp;gt;  &lt;br /&gt;60:       &lt;br /&gt;61:    &amp;lt;/services&amp;gt;  &lt;br /&gt;62:        &lt;br /&gt;63:  &amp;lt;/jbossesb&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Lines 7-24 - This is the definition of the file system gateway. What's interesting to note here are: &lt;/li&gt;&lt;li&gt;Lines 11-12 - Here's the input directory. Based on its configuration, the listener will listen for files with an .xml extension that are created in the INPUT directory. &lt;/li&gt;&lt;li&gt;Line 13 - While the file gateway is processing the file, it is renamed to have an extension of "esbWorking". &lt;/li&gt;&lt;li&gt;Lines 14-16 - After the file is processed, it is renamed again, this time to have an extension of "sentToEsb," and then it is deleted. &lt;/li&gt;&lt;li&gt;Lines 17-19 - And, if an error occurs, the file is renamed to have an extension of "IN_ERROR" and is saved in the error directory.&lt;/li&gt;&lt;/ul&gt;The "Splitter" service is defined in lines 31-48. The most interesting lines are:&lt;br /&gt;&lt;pre style="background: url(&amp;quot;http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif&amp;quot;) repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;35:  &amp;lt;fs-listener name="FileGateway" busidref="smooksFileChannel" is-gateway="true" schedule-frequency="2"&amp;gt;  &lt;br /&gt;36:      &amp;lt;property name="composer-class" value="org.jboss.soa.esb.smooks.splitting.FileStreamSplitter"/&amp;gt;  &lt;br /&gt;37:      &amp;lt;property name="splitterConfig" value="/smooks-config.xml"/&amp;gt;  &lt;br /&gt;38:  &amp;lt;/fs-listener&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;property name="splitterConfig" value="/smooks-config.xml"&gt;&lt;/property&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;fs-listener busidref="smooksFileChannel" is-gateway="true" name="FileGateway" schedule-frequency="2"&gt;&lt;property name="composer-class" value="org.jboss.soa.esb.smooks.splitting.FileStreamSplitter"&gt;Line 35 - Here's the start of the file gateway definition. &lt;/property&gt;&lt;/fs-listener&gt;&lt;/li&gt;&lt;li&gt;&lt;fs-listener busidref="smooksFileChannel" is-gateway="true" name="FileGateway" schedule-frequency="2"&gt;&lt;property name="composer-class" value="org.jboss.soa.esb.smooks.splitting.FileStreamSplitter"&gt; Line 36 - Note that when the file gateway detects the presence of a file, it invokes the Smooks org.jboss.soa.esb.smooks.splitting.FileStreamSplitter class. And what does this class do with the file? &lt;/property&gt;&lt;/fs-listener&gt;&lt;/li&gt;&lt;li&gt;&lt;fs-listener busidref="smooksFileChannel" is-gateway="true" name="FileGateway" schedule-frequency="2"&gt;&lt;property name="composer-class" value="org.jboss.soa.esb.smooks.splitting.FileStreamSplitter"&gt; Line 37 - It splits the message into fragments, based on the conditions and actions defined in the smooks-config.xml file.&lt;/property&gt;&lt;/fs-listener&gt;&lt;/li&gt;&lt;/ul&gt;&lt;fs-listener busidref="smooksFileChannel" is-gateway="true" name="FileGateway" schedule-frequency="2"&gt;&lt;property name="composer-class" value="org.jboss.soa.esb.smooks.splitting.FileStreamSplitter"&gt;The message fragments are then routed to the Receiver service, which simply writes the message to the server.log.&lt;br /&gt;&lt;br /&gt;The smooks-config.xml file is where the file splitting and routing is defined, so let's take a closer look there:&lt;br /&gt;&lt;/property&gt;&lt;/fs-listener&gt;&lt;br /&gt;&lt;pre style="background: url(&amp;quot;http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif&amp;quot;) repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;1:  &amp;lt;?xml version="1.0"?&amp;gt;  &lt;br /&gt;2:  &amp;lt;smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"  &lt;br /&gt;3:          xmlns:jb="http://www.milyn.org/xsd/smooks/javabean-1.2.xsd"  &lt;br /&gt;4:          xmlns:ftl="http://www.milyn.org/xsd/smooks/freemarker-1.1.xsd"  &lt;br /&gt;5:          xmlns:esbr="http://www.jboss.org/xsd/jbossesb/smooks/routing-1.0.xsd"&amp;gt;  &lt;br /&gt;6:   &lt;br /&gt;7:      &amp;lt;params&amp;gt;          &lt;br /&gt;8:          &amp;lt;param name="stream.filter.type"&amp;gt;SAX&amp;lt;/param&amp;gt;  &lt;br /&gt;9:      &amp;lt;/params&amp;gt;  &lt;br /&gt;10:   &lt;br /&gt;11:     &amp;lt;conditions&amp;gt;  &lt;br /&gt;12:         &amp;lt;!-- route the even numbered order items --&amp;gt;  &lt;br /&gt;13:         &amp;lt;condition id="routeItem"&amp;gt;&amp;lt;!-- orderItem.itemId % 2 == 0 --&amp;gt;&amp;lt;/condition&amp;gt;  &lt;br /&gt;14:     &amp;lt;/conditions&amp;gt;  &lt;br /&gt;15:   &lt;br /&gt;16:     &amp;lt;!-- Capture some data from the message into the bean context... --&amp;gt;  &lt;br /&gt;17:     &amp;lt;jb:bean beanId="header" class="java.util.Hashtable" createOnElement="order"&amp;gt;  &lt;br /&gt;18:         &amp;lt;jb:value property="orderId" data="order/@id"/&amp;gt;  &lt;br /&gt;19:         &amp;lt;jb:value property="customerNumber" data="header/customer/@number"/&amp;gt;  &lt;br /&gt;20:         &amp;lt;jb:value property="customerName" data="header/customer"/&amp;gt;  &lt;br /&gt;21:     &amp;lt;/jb:bean&amp;gt;  &lt;br /&gt;22:     &amp;lt;jb:bean beanId="orderItem" class="java.util.Hashtable" createOnElement="order-item"&amp;gt;  &lt;br /&gt;23:         &amp;lt;jb:value property="itemId" data="order-item/@id"/&amp;gt;  &lt;br /&gt;24:         &amp;lt;jb:value property="productId" data="order-item/product"/&amp;gt;  &lt;br /&gt;25:         &amp;lt;jb:value property="quantity" data="order-item/quantity"/&amp;gt;  &lt;br /&gt;26:         &amp;lt;jb:value property="price" data="order-item/price"/&amp;gt;  &lt;br /&gt;27:     &amp;lt;/jb:bean&amp;gt;  &lt;br /&gt;28:   &lt;br /&gt;29:     &amp;lt;!-- On each order-item, apply a template to the data captured into the bean context,  &lt;br /&gt;30:          binding the templating result back into the bean context under the  &lt;br /&gt;31:          beanId "orderItemFragment" to be routed by the following ESB Router... --&amp;gt;  &lt;br /&gt;32:     &amp;lt;ftl:freemarker applyOnElement="order-item"&amp;gt;  &lt;br /&gt;33:         &amp;lt;condition idRef="routeItem" /&amp;gt;  &lt;br /&gt;34:         &amp;lt;ftl:template&amp;gt;/orderitem-split.ftl&amp;lt;/ftl:template&amp;gt;  &lt;br /&gt;35:         &amp;lt;ftl:use&amp;gt;  &lt;br /&gt;36:            &amp;lt;ftl:bindTo id="orderItemFragment" /&amp;gt;  &lt;br /&gt;37:         &amp;lt;/ftl:use&amp;gt;  &lt;br /&gt;38:     &amp;lt;/ftl:freemarker&amp;gt;  &lt;br /&gt;39:   &lt;br /&gt;40:     &amp;lt;!-- On each order-item, route the "orderItemFragment" bean to the  --&amp;gt;  &lt;br /&gt;41:     &amp;lt;esbr:routeBean beanIdRef="orderItemFragment" toServiceCategory="QS" toServiceName="Receiver" routeOnElement="order-item"&amp;gt;  &lt;br /&gt;42:         &amp;lt;condition idRef="routeItem" /&amp;gt;  &lt;br /&gt;43:     &amp;lt;/esbr:routeBean&amp;gt;  &lt;br /&gt;44:  &lt;br /&gt;45: &amp;lt;/smooks-resource-list&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;As we described a minute ago, the two main actions being performed are the splitting of the incoming message into fragments, and then the routing of the resulting fragments to services. Let's look at the how the splitting is performed. Recall that the sampleOrder.xml file included these XML elements.&lt;br /&gt;&lt;pre style="background: url(&amp;quot;http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif&amp;quot;) repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt; &amp;lt;order id='332'&amp;gt;  &lt;br /&gt; &amp;lt;header&amp;gt;  &lt;br /&gt; &amp;lt;customer number="123"&amp;gt;Joe&amp;lt;/customer&amp;gt;  &lt;br /&gt; &amp;lt;/header&amp;gt;  &lt;br /&gt; &amp;lt;order-items&amp;gt;  &lt;br /&gt; &amp;lt;order-item id='1'&amp;gt;  &lt;br /&gt; &amp;lt;product&amp;gt;1&amp;lt;/product&amp;gt;  &lt;br /&gt; &amp;lt;quantity&amp;gt;2&amp;lt;/quantity&amp;gt;  &lt;br /&gt; &amp;lt;price&amp;gt;8.80&amp;lt;/price&amp;gt;  &lt;br /&gt; &amp;lt;/order-item&amp;gt;  &lt;br /&gt; (followed by more order-items)  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Remember how we talked about Smooks' ability to process large messages efficiently? At this point, it's important to note that when Smooks splits the XML message, it processes each orderItem one at a time, and it only keeps one orderItem in memory at a time. This is one way in which Smooks is able to efficiently process large messages.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Lines 17-21 - As the comments indicate, this captures data from the message, and extracts the orderId, customerName and customerNumber properties (note the use of xPath to navigate the original XML message) into a header (org.jboss.soa.esb.sample.quickstart.smooksfilesplitterrouter.Header) bean. &lt;/li&gt;&lt;li&gt;Lines 22-27 - And, this does the same for the orderItems. &lt;/li&gt;&lt;li&gt;Lines 30-38 - And here, Smooks takes the header and orderItems beans, and uses a Freemarker (http://freemarker.sourceforge.net/) template to create an orderItemFragment bean that has this organization:&lt;/li&gt;&lt;/ul&gt;&lt;pre style="background: url(&amp;quot;http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif&amp;quot;) repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;1:   &amp;lt;orderitem id="${orderItem.itemId}" order="${header.orderId}"&amp;gt;  &lt;br /&gt;2:       &amp;lt;customer&amp;gt;  &lt;br /&gt;3:           &amp;lt;name&amp;gt;${header.customerName}&amp;lt;/name&amp;gt;  &lt;br /&gt;4:           &amp;lt;number&amp;gt;${header.customerNumber}&amp;lt;/number&amp;gt;  &lt;br /&gt;5:       &amp;lt;/customer&amp;gt;  &lt;br /&gt;6:       &amp;lt;details&amp;gt;  &lt;br /&gt;7:           &amp;lt;productId&amp;gt;${orderItem.productId}&amp;lt;/productId&amp;gt;  &lt;br /&gt;8:           &amp;lt;quantity&amp;gt;${orderItem.quantity}&amp;lt;/quantity&amp;gt;  &lt;br /&gt;9:           &amp;lt;price&amp;gt;${orderItem.price}&amp;lt;/price&amp;gt;  &lt;br /&gt;10:       &amp;lt;/details&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;Note that Smooks is able to combine elements from both the header and orderItems beans into an orderItemFragment bean.&lt;br /&gt;&lt;br /&gt;So much for the splitting, now let's take a look at how Smooks routes the message fragments to services.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Lines 11-14 - First, Smooks establishes a condition ("routeItem") that must be met in order for the message to be routed. In this example, the value of the orderItem.itemId element must be an even number. &lt;/li&gt;&lt;li&gt;Lines 41 - And here's where the routing actually starts. This line defines the attributes for the JBoss ESB router ("routeBean"). The attributes defined for this quickstart are: &lt;/li&gt;&lt;li&gt;beanIdRef&amp;nbsp; - this is the references of the bean that will be routed to the intended service &lt;/li&gt;&lt;li&gt;toServiceCategory - The category of that service, as defined in the quickstart's jboss-esb.xml file &lt;/li&gt;&lt;li&gt;toServiceName - And the name of that service ("Receiver"), again, as defined in the quickstart's jboss-esb.xml file &lt;/li&gt;&lt;li&gt;routeOnElement - And, finally the content element used to determine the route for messages to follow - in the case of the quickstart, this is the order-item&lt;/li&gt;&lt;/ul&gt;A good way to look at content based routing with Smooks is that new messages are built from data in fragments in the original source message. In the case of the quickstart, we want to route data from each &lt;order-item&gt; in an &lt;order&gt; message.&amp;nbsp; In this case, since the routeOnElement is the order-item, when the Smooks processing filter reaches the end of every order-item fragment, it will route a message to "somewhere" i.e. the end of the fragment is used to trigger the routing. (&lt;i&gt;Many thanks to Tom F. for this summary!&lt;/i&gt;)&lt;/order&gt;&lt;/order-item&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;order-item&gt;&lt;order&gt;Line 42 - The ID of the condition that must match in order for the routing to occur. This ID ("routeItem") maps to the routing condition defined in line 13. &lt;/order&gt;&lt;/order-item&gt;&lt;/li&gt;&lt;/ul&gt;&lt;order-item&gt;&lt;order&gt;  One attribute that is not explicitly defined by in this quickstart is "routeBefore." This attribute enables you to control when the routing occurs. This can be either (at the start) a specific message fragment is processed by Smooks, or after (at the end) it has processed the fragment. The default value is after, which is why the quickstart does not explicitly define the attribute.&lt;br /&gt;&lt;br /&gt;Note that the full set of attributes that control routing to JBossESB services with Smooks are defined in the routing-1.0.xsd file that is deployed to a SOA Platform server in: smooks.esb/META-INF/xsd/jbossesb/smooks/routing-1.0.xsd&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Closing Thoughts&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;OK, let's review what happened. The quickstart demonstrated two features of the integration between Smooks and the JBossESB in the SOA Platform; file splitting and routing. First, the quickstart took a single, and potentially very large XML file, and split its content into two separate beans, then combined elements of those two beans into a new bean. When Smooks performed this splitting and transformation of data from one form to another, it did so in a serial fashion, where only one instance was in memory at a time, so that it could efficiently handle even large numbers of instances. Then, Smooks found an element in the newly created bean, and based on the content of that element, routed the newly created bean in a message to an ESB service.&lt;br /&gt;&lt;br /&gt;And - note that in order for this quickstart to accomplish these tasks, it was not necessary to write large amounts of new custom code. A Smooks configuration file and a FreeMarker template file, coupled with a call to the org.jboss.soa.esb.smooks.splitting.FileStreamSplitter class was all that was needed in the quickstart. Smooks and the JBossESB in the SOA Platform did the rest!&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Acknowledgements&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;As always, I want to thank the JBoss SOA Platform team and community (especially Tom Fennally and Kevin Conner) for their timely review input for this blog post!&lt;br /&gt;&lt;br /&gt;&lt;b&gt;References&lt;/b&gt;&lt;/order&gt;&lt;/order-item&gt;&lt;order-item&gt;&lt;order&gt;&amp;nbsp;&lt;/order&gt;&lt;/order-item&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;order-item&gt;&lt;order&gt;&lt;a href="http://www.smooks.org/%20"&gt;http://www.smooks.org/&lt;/a&gt;&lt;/order&gt;&lt;/order-item&gt;&lt;/li&gt;&lt;li&gt;&lt;order-item&gt;&lt;order&gt;&lt;a href="http://smooks.org/mediawiki/index.php?title=V1.4:Smooks_v1.4_User_Guide#Basic_Processing_Model%20"&gt;http://smooks.org/mediawiki/index.php?title=V1.4:Smooks_v1.4_User_Guide#Basic_Processing_Model &lt;/a&gt;&lt;/order&gt;&lt;/order-item&gt;&lt;/li&gt;&lt;li&gt;&lt;order-item&gt;&lt;order&gt; &lt;a href="http://smooks.org/mediawiki/index.php?title=V1.4:Smooks_v1.4_User_Guide#Splitting_.26_Routing%20"&gt;http://smooks.org/mediawiki/index.php?title=V1.4:Smooks_v1.4_User_Guide#Splitting_.26_Routing &lt;/a&gt;&lt;/order&gt;&lt;/order-item&gt;&lt;/li&gt;&lt;li&gt;&lt;order-item&gt;&lt;order&gt; &lt;a href="http://smooks.org/mediawiki/index.php?title=Smooks_v1.4_Examples#Huge_Message_Processing_.2F_Splitting_.26_Routing%20"&gt;http://smooks.org/mediawiki/index.php?title=Smooks_v1.4_Examples#Huge_Message_Processing_.2F_Splitting_.26_Routing &lt;/a&gt;&lt;/order&gt;&lt;/order-item&gt;&lt;/li&gt;&lt;li&gt;&lt;order-item&gt;&lt;order&gt; &lt;a href="http://community.jboss.org/wiki/ComplexSplittingEnrichmentandRoutingofHugeMessages%20"&gt;http://community.jboss.org/wiki/ComplexSplittingEnrichmentandRoutingofHugeMessages &lt;/a&gt;&lt;/order&gt;&lt;/order-item&gt;&lt;/li&gt;&lt;li&gt;&lt;order-item&gt;&lt;order&gt; &lt;a href="http://jboss-soa-p.blogspot.com/2009/09/works-great-right-out-of-box.html%20"&gt;http://jboss-soa-p.blogspot.com/2009/09/works-great-right-out-of-box.html &lt;/a&gt;&lt;/order&gt;&lt;/order-item&gt;&lt;/li&gt;&lt;li&gt;&lt;order-item&gt;&lt;order&gt; &lt;a href="http://jboss-soa-p.blogspot.com/2009/07/when-content-knows-way-content-based.html%20"&gt;http://jboss-soa-p.blogspot.com/2009/07/when-content-knows-way-content-based.html&amp;nbsp;&lt;/a&gt;&amp;nbsp;&lt;/order&gt;&lt;/order-item&gt;&lt;/li&gt;&lt;/ul&gt;&lt;order-item&gt;&lt;order&gt;&amp;nbsp;&lt;/order&gt;&lt;/order-item&gt;&lt;order-item&gt;&lt;order&gt; &lt;/order&gt;&lt;/order-item&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9094589327053503491-5336630672700041448?l=jboss-soa-p.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jboss-soa-p.blogspot.com/feeds/5336630672700041448/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9094589327053503491&amp;postID=5336630672700041448' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/5336630672700041448'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/5336630672700041448'/><link rel='alternate' type='text/html' href='http://jboss-soa-p.blogspot.com/2011/01/jbossesb-smooks-integration-in-soa.html' title='The JBossESB-Smooks Integration in the SOA Platform'/><author><name>Len DiMaggio</name><uri>http://www.blogger.com/profile/07124585546929851174</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='20' src='http://1.bp.blogspot.com/_Wad47xG7w3A/Sc7b75epEEI/AAAAAAAAAQ4/F9-h0znUI7w/S220/Boston.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_Wad47xG7w3A/TS0iA_QVu3I/AAAAAAAADNc/tQL8iAMLA0c/s72-c/Screenshot.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9094589327053503491.post-6928512760103306444</id><published>2010-09-27T17:26:00.000-07:00</published><updated>2010-09-27T17:26:36.537-07:00</updated><title type='text'>Cross Posted to DZone</title><content type='html'>The SOA Platform - JBossESB - SAML post was just cross posted on DZone:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://java.dzone.com/articles/asserting-security-jbossesb"&gt;http://java.dzone.com/articles/asserting-security-jbossesb&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9094589327053503491-6928512760103306444?l=jboss-soa-p.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jboss-soa-p.blogspot.com/feeds/6928512760103306444/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9094589327053503491&amp;postID=6928512760103306444' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/6928512760103306444'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/6928512760103306444'/><link rel='alternate' type='text/html' href='http://jboss-soa-p.blogspot.com/2010/09/cross-posted-to-dzone.html' title='Cross Posted to DZone'/><author><name>Len DiMaggio</name><uri>http://www.blogger.com/profile/07124585546929851174</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='20' src='http://1.bp.blogspot.com/_Wad47xG7w3A/Sc7b75epEEI/AAAAAAAAAQ4/F9-h0znUI7w/S220/Boston.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9094589327053503491.post-338307079561583726</id><published>2010-09-20T19:13:00.000-07:00</published><updated>2010-09-20T19:13:35.323-07:00</updated><title type='text'>Asserting Security - The JBossESB Integration with SAML in the JBoss SOA Platform</title><content type='html'>&lt;b&gt;Introduction - When Two User Accounts is One Too Many&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Have you ever noticed how whenever you visit a new doctor, you have to fill out a new medical history, longhand and on paper? Sometimes you make a mistake or sometimes someone else makes a mistake transcribing the information. Why can't the information be shared in a secure way? The same type of problem exists with computer systems, web applications, and passwords. If you frequently access multiple remote systems or applications, you invariably have to manage multiple user accounts. (At one of my past jobs, I actually had 17 user accounts across several systems. &amp;nbsp;The killer was that the accounts all had different password complexity rules and expiration schedules.)&lt;br /&gt;&lt;br /&gt;What's happening here is that you have authentication and authorization information in different security "domains". What's needed in our internet and web-based world, is a standard way to securely (and easily!) share user accounts between systems. In other words, we need a way to perform "single sign-on" (SSO) between multiple security domains. What you want to be able to do is to have the different applications and sites that you rely on, regardless of each application's implementation or operating environment, to be able to safely share your login information, without you having to login repeatedly, or maintain multiple different accounts. &lt;br /&gt;&lt;br /&gt;One solution to this problem is the "Security Assertion Markup Language" (SAML). &lt;br /&gt;&lt;br /&gt;&lt;b&gt;The Standard: SAML&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;SAML was created by the Security Services Technical Committee of the Organization for the Advancement of Structured Information Standards (OASIS - &lt;a href="http://www.oasis-open.org/"&gt;http://www.oasis-open.org&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;Wikipedia (&lt;a href="http://en.wikipedia.org/wiki/SAML"&gt;http://en.wikipedia.org/wiki/SAML&lt;/a&gt;) defines SAML as: &lt;i&gt;'...an XML-based standard for exchanging authentication and authorization data between security domains, that is, between an identity provider (a producer of assertions) and a &lt;/i&gt;&lt;i&gt;service provider (a consumer of assertions)...'&lt;/i&gt;&lt;br /&gt;Ref: Organization for the Advancement of Structured Information Standards (OASIS - &lt;a href="http://www.oasis-open.org/"&gt;http://www.oasis-open.org&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;Let's dissect that deceptively short definition into smaller pieces. Each of these pieces covers one of SAML's important characteristics and the motivations for its creation.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;XML based&lt;/b&gt; - One of the goals of the SAML is for it to be a standard that can be used by different applications and systems to replace proprietary security methods. If you're going to create a standard, then basing it on XML is a good start!&lt;/li&gt;&lt;li&gt;&lt;b&gt;Exchanging data&lt;/b&gt; - The ultimate goal is of course to support the secure exchange of data between applications and systems and users. In the context of security, the applications, systems, and users are referred to as "principals.")&lt;/li&gt;&lt;li&gt;&lt;b&gt;Authentication and Authorization&lt;/b&gt; - These two aspects of security are related, but refer to different tasks. Authentication refers to verifying the identity of the principle. Authorization refers to verifying that the principal is permitted to perform a specific action.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Security domains&lt;/b&gt; - "Federation" is an important concept to keep in mind when you talk about security domains. In the context of a political system, federation refers to the separating of overlapping of areas of control between the states that make up a greater federation. It may be that each state is able to make laws specific to the state, but they must also abide by the laws of the greater federation. (Ever hear of Fort Sumter? http://www.nps.gov/fosu/) It's like that when security domains are federated too. You might want to establish a large-scale domain for all your employees, so that they can all use the same login information to access multiple shared systems such as vacation trackers or a corporate intranet, while at the same time, you can establish smaller domains so that restricted groups of those employees can use that same login information to access purchasing or payroll information.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Identity Provider&lt;/b&gt; - In the context of using SAML, an identity provider supplies authentication information when and where requested by a principal. Note that this in contrast to security systems that rely on cookies stored and supplied by the client web browsers, or ticketing systems such as Kerberos where the client supplies a ticket to a service. In SAML, a Identity Providers are the producers of security "assertions."&lt;/li&gt;&lt;li&gt;&lt;b&gt;Service Provider&lt;/b&gt; - In the context of using SAML, service providers rely on Identity Providers. When the principal requests its identity to be confirmed, an Identity Provider sends this information, in the form of a SAML sercurity assertion. So, in SAML, Service Providers are the consumers of the security assertions.&lt;/li&gt;&lt;/ul&gt;But, while it is a standard, it is not an implementation. For a SAML implemention, we need to look at JBoss PicketLink.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;The Implementation: JBoss PicketLink&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;PicketLink (&lt;a href="http://jboss.org/picketlink"&gt;http://jboss.org/picketlink&lt;/a&gt;) is the JBoss Identity Management (IdM) project. PicketLink is actually built on the JBoss "PicketBox" (formerly known as "JBoss Security") framework. PicketBox (&lt;a href="http://www.jboss.org/picketbox"&gt;http://www.jboss.org/picketbox&lt;/a&gt;) provides developers with a framework where these security functions can be easily configured: authentication, authorization, auditing, and mapping (Principal to Roles and Attributes).&lt;br /&gt;&lt;br /&gt;PicketLink is an "umbrella" project that pulls together multiple components to support various security and Identity Management requirements. As listed on the PicketLink project site, these components are: &lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://jboss.org/picketlink/AuthZ.html"&gt;AuthZ&lt;/a&gt; (a authorization framework)&lt;/li&gt;&lt;li&gt;&lt;a href="http://jboss.org/picketlink/Fed.html"&gt;Federated Identity&lt;/a&gt; (remember our discussion of federated security domains a minute ago?) &lt;/li&gt;&lt;li&gt;&lt;a href="http://jboss.org/picketlink/IDM.html"&gt;Identity Management&lt;/a&gt; (this provides a common framework for handing users and groups and supports using identity repositories such as LDAP)&lt;/li&gt;&lt;li&gt;&lt;a href="http://jboss.org/picketlink/Negotiation.html"&gt;Negotiation&lt;/a&gt; (this provides SPNego*/Kerberos based Desktop single sign-on)&lt;/li&gt;&lt;li&gt;&lt;a href="http://jboss.org/picketlink/XACML.html"&gt;XACML&lt;/a&gt;&amp;nbsp; (an implementation of the Oasis &lt;span class="headingtext"&gt;eXtensible Access Control Markup Language&lt;/span&gt; - this provides fine-grained authorization capabilities)&lt;/li&gt;&lt;/ul&gt;* Simple and Protected &lt;a class="mw-redirect" href="http://en.wikipedia.org/wiki/GSSAPI" title="GSSAPI"&gt;GSSAPI&lt;/a&gt; (Generic Security Services Application Programming Interface) Negotiation Mechanism - yes, that is a mouthful.&lt;br /&gt;&lt;br /&gt;&lt;div id="u83b" style="text-align: left;"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_Wad47xG7w3A/TJgUQwqO3vI/AAAAAAAACrY/eKjw6Y4kOiU/s1600/SAMLdiagram.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="300" src="http://4.bp.blogspot.com/_Wad47xG7w3A/TJgUQwqO3vI/AAAAAAAACrY/eKjw6Y4kOiU/s400/SAMLdiagram.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;Security Token Service (STS)&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The SAML integration with the JBossESB in the SOA Platform is supported by the PicketLink Security Token Service (PicketLinkSTS). PicketLink provides login modules (&lt;a href="https://community.jboss.org/wiki/PicketLinkSTSLoginModules"&gt;https://community.jboss.org/wiki/PicketLinkSTSLoginModules&lt;/a&gt;) two of which JBossESB uses.&lt;br /&gt;&lt;br /&gt;The primary focus of the ESB integration is for PicketLink to provide security modules and SAML Token support for ESB services. (&lt;span class="Object" id="p28m"&gt;&lt;span class="Object" id="rxhp"&gt;&lt;a href="http://community.jboss.org/wiki/JBossESBSAMLSupport" target="_blank"&gt;http://community.jboss.org/wiki/JBossESBSAMLSupport&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;) The ESB service configures the org.picketlink.identity.federation.core.wstrust.auth.STSIssuingLoginModule class to issue (produce) a SAML Security Token.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;The best way to look at this integration is to see it in action. So, we'll "learn by doing" by examining it in a SOA Platform "quickstart."&lt;br /&gt;&lt;br /&gt;&lt;b&gt;The Quickstart&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I never get tired of saying that one of the great features of the SOA Platform is its extensive, and always growing, set of "quickstart" programs. These programs go far beyond being simple examples as they clearly illustrate various features supported by the Platform. They also serve as a great resource for writing your own applications. For our example, we'll look at the "security_saml" quickstart.&lt;br /&gt;&lt;br /&gt;This quickstart illustrates the SOA Platform JBossESB's support for SAML support as provided by PicketLink's Security Token Service (PicketLinkSTS). As the quickstart's readme file states:&lt;br /&gt;&lt;br /&gt;&amp;nbsp; The following (4) procedures will be demonstrated by this quickstart:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Using the PicketLink Project's STSIssuingLoginModule to issue a SAML Assertion from PicketLinkSTS, then&lt;/li&gt;&lt;li&gt;Using the PicketLink Project's STSValidatingLoginModule to validate a SAML Assertion from PicketLinkSTS, then&lt;/li&gt;&lt;li&gt;Injecting the SAML Assertion into a SOAP Message, then&lt;/li&gt;&lt;li&gt;Using SOAPProcessor to invoke an external Web Service that is secured by PicketLinkSTS.&lt;/li&gt;&lt;/ol&gt;Before we walk through the actions that quickstart performs, let's examine the configuration and binary files that control these procedures. Because the quickstart has to handle the issuing and validation of the &lt;br /&gt;SAML Assertion in addition to actually configuring the quickstart's web service and sending a message to that service, there are a larger number of configuration, execution, and test data related XML files than are used in some other quickstarts. &lt;br /&gt;&lt;br /&gt;But, hey, don't panic! We'll examine the files in detail and describe how they are used and also, how they all tie together. Let's divide and conquer and examine these files in the following logical groups:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Group #1 - PicketLinkSTS related files&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;picketlink-sts-client.properties&lt;/li&gt;&lt;li&gt;login-config-unfiltered.xml&lt;/li&gt;&lt;li&gt;jboss-service.xml&lt;/li&gt;&lt;li&gt;jboss-wsse-client.xml&lt;/li&gt;&lt;/ul&gt;&amp;nbsp;&lt;b&gt;Group #2 - Test data related files&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;soap-request.xml&lt;/li&gt;&lt;li&gt;smooks-saml-injector-template.xml&lt;/li&gt;&lt;li&gt;|smooks-saml-injector.xml&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;Group #3 - ESB archive related files&amp;nbsp;&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;deployment.xm&lt;/li&gt;&lt;li&gt;jbm-queue-service.xml&lt;/li&gt;&lt;li&gt;jboss-esb.xml&lt;/li&gt;&lt;li&gt;jbossesb-properties.xml&lt;/li&gt;&lt;/ul&gt;NOTE: We'll hop around a bit between these groups of files, depending on the relationships between the files. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Group #1 - PicketLinkSTS related files&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Let's start with the PicketLink's Security Token Service related files.&lt;br /&gt;&lt;br /&gt;The picketlink-sts-client.properties file defines the STS configuration for the STSIssuingLoginModule and STSValidatingLoginModule.&lt;br /&gt;&lt;br /&gt;&lt;pre style="-moz-background-clip: -moz-initial; -moz-background-inline-policy: -moz-initial; -moz-background-origin: -moz-initial; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black;"&gt;1:  serviceName=PicketLinkSTS  &lt;br /&gt;2:  portName=PicketLinkSTSPort  &lt;br /&gt;3:  endpointAddress=http://localhost:8080/picketlink-sts/PicketLinkSTS  &lt;br /&gt;4:  username=admin  &lt;br /&gt;5:  password=admin  &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Line 1 - The service name. Make a mental note of this as we'll come back to this in a minute.&lt;/li&gt;&lt;li&gt;Line 3 - The endpoint of service. This will be active once we deploy the quickstart.&lt;/li&gt;&lt;li&gt;Line 4-5 - This username and password are actually only used by the STSValidatingLoginModule.&amp;nbsp; In contrast, the STSIssuingLoginModule uses callbacks to retrieve the username and password from the authentication request, which is extracted from the SOAP Security header. Where is the SOAP Security header defined? Read on.&lt;/li&gt;&lt;/ul&gt;Like most of the SOA Platform quickstarts, the security_saml quickstart initiates its actions by generating a message that then is sent over the Platform's JBossESB to selected services. The soap-request.xml file defines the SOAP request that is sent.&lt;br /&gt;&lt;br /&gt;&lt;pre style="-moz-background-clip: -moz-initial; -moz-background-inline-policy: -moz-initial; -moz-background-origin: -moz-initial; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black;"&gt;1:  &amp;lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:good="http://security_saml/goodbyeworld" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"&amp;gt;  &lt;br /&gt;2:    &amp;lt;soapenv:Header&amp;gt;  &lt;br /&gt;3:      &amp;lt;wsse:Security&amp;gt;  &lt;br /&gt;4:     &amp;lt;wsse:UsernameToken&amp;gt;  &lt;br /&gt;5:      &amp;lt;wsse:Username&amp;gt;admin&amp;lt;/wsse:Username&amp;gt;  &lt;br /&gt;6:      &amp;lt;wsse:Password&amp;gt;admin&amp;lt;/wsse:Password&amp;gt;  &lt;br /&gt;7:     &amp;lt;/wsse:UsernameToken&amp;gt;  &lt;br /&gt;8:    &amp;lt;/wsse:Security&amp;gt;  &lt;br /&gt;9:    &amp;lt;/soapenv:Header&amp;gt;  &lt;br /&gt;10:    &amp;lt;soapenv:Body&amp;gt;  &lt;br /&gt;11:      &amp;lt;good:sayGoodbye&amp;gt;  &lt;br /&gt;12:       &amp;lt;message&amp;gt;Goodbye!!&amp;lt;/message&amp;gt;  &lt;br /&gt;13:      &amp;lt;/good:sayGoodbye&amp;gt;  &lt;br /&gt;14:    &amp;lt;/soapenv:Body&amp;gt;  &lt;br /&gt;15:   &amp;lt;/soapenv:Envelope&amp;gt;  &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Lines 4-7 - These are the lines that we're interested in for this file. The "UsernameToken" security header information is used by the STSIssuingLoginModule as the username/credential for the user for whom a security token should be issued.&lt;/li&gt;&lt;/ul&gt;Speaking of the STSIssuingLoginModule, let's shift gears and look at the "quickstart-specific-assemblies" ant target in the build.xml file. This target is called when the quickstart is deployed.&lt;br /&gt;&lt;br /&gt;&lt;pre style="-moz-background-clip: -moz-initial; -moz-background-inline-policy: -moz-initial; -moz-background-origin: -moz-initial; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black;"&gt;1:   &amp;lt;target name="quickstart-specific-assemblies"&amp;gt;  &lt;br /&gt;2:     &amp;lt;!-- Overriden from the target of the same name in base-build.xml. --&amp;gt;  &lt;br /&gt;3:     &amp;lt;!-- Called by the "deploy" target. Don't call directly!! --&amp;gt;  &lt;br /&gt;4:    &lt;br /&gt;5:     &amp;lt;!-- Build the webservice... --&amp;gt;  &lt;br /&gt;6:       &amp;lt;war warfile="build/${ant.project.name}.war"  &lt;br /&gt;7:         webxml="${basedir}/war/resources/WEB-INF/web.xml"&amp;gt;  &lt;br /&gt;8:         &amp;lt;fileset dir="${basedir}/war/view"&amp;gt;  &lt;br /&gt;9:           &amp;lt;include name="**/*"/&amp;gt;  &lt;br /&gt;10:         &amp;lt;/fileset&amp;gt;  &lt;br /&gt;11:       &amp;lt;/war&amp;gt;  &lt;br /&gt;12:    &lt;br /&gt;13:       &amp;lt;copy file="${basedir}/login-config-unfiltered.xml" tofile="${basedir}/login-config.xml" filtering="true" overwrite="true"&amp;gt;  &lt;br /&gt;14:               &amp;lt;filterset&amp;gt;  &lt;br /&gt;15:                   &amp;lt;filter token="STS_CONFIG_FILE_PATH" value="${basedir}/picketlink-sts-client.properties"/&amp;gt;  &lt;br /&gt;16:               &amp;lt;/filterset&amp;gt;  &lt;br /&gt;17:           &amp;lt;/copy&amp;gt;  &lt;br /&gt;18:     &amp;lt;/target&amp;gt;  &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Lines 6-11 create the .war file that is used to deploy the quickstart's target web service. We'll come back to this service in a bit. &lt;/li&gt;&lt;li&gt;For now, let's look at the &lt;copy&gt; element on lines 13-17. What's happening here is that the login-config-unfiltered.xml file is used as a template to create a login-config.xml file that will be used by the quickstart's services. The processing of the &lt;copy&gt; element replaces the "STS_CONFIG_FILE_PATH" string in login-config-unfiltered.xml with the value defined in line 44.&lt;/copy&gt;&lt;/copy&gt;&lt;/li&gt;&lt;/ul&gt;What's the point of doing this templating? After all, why not just edit the login-config.xml file directly? It's a safety measure and is typically used with ant to build a project so that you can easily and safely make changes to a project and perhaps several configuration files with one command. This is much safer than trying to remember all the places that you have to edit the same information.&lt;br /&gt;&lt;br /&gt;In our case, this &lt;copy&gt; results in a login-config.xml file that looks like this:&lt;br /&gt;&lt;br /&gt;&lt;/copy&gt;&lt;br /&gt;&lt;pre style="-moz-background-clip: -moz-initial; -moz-background-inline-policy: -moz-initial; -moz-background-origin: -moz-initial; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black;"&gt;1:  &amp;lt;policy&amp;gt;  &lt;br /&gt;2:      &amp;lt;application-policy name="saml-issue-token"&amp;gt;  &lt;br /&gt;3:      &amp;lt;authentication&amp;gt;  &lt;br /&gt;4:        &amp;lt;login-module code="org.picketlink.identity.federation.core.wstrust.auth.STSIssuingLoginModule" flag="required"&amp;gt;  &lt;br /&gt;5:          &amp;lt;module-option name="configFile"&amp;gt;/jboss/local/502_CR3_signed/jboss-soa-p.5.0.0/jboss-as/samples/quickstarts/security_saml/picketlink-sts-client.properties&amp;lt;/module-option&amp;gt;  &lt;br /&gt;6:          &amp;lt;module-option name="endpointURI"&amp;gt;http://security_saml/goodbyeworld&amp;lt;/module-option&amp;gt;  &lt;br /&gt;7:          &amp;lt;module-option name="password-stacking"&amp;gt;true&amp;lt;/module-option&amp;gt;  &lt;br /&gt;8:        &amp;lt;/login-module&amp;gt;  &lt;br /&gt;9:        &amp;lt;login-module code="org.picketlink.identity.federation.core.wstrust.auth.STSValidatingLoginModule" flag="required"&amp;gt;  &lt;br /&gt;10:           &amp;lt;module-option name="configFile"&amp;gt;/jboss/local/502_CR3_signed/jboss-soa-p.5.0.0/jboss-as/samples/quickstarts/security_saml/picketlink-sts-client.properties&amp;lt;/module-option&amp;gt;  &lt;br /&gt;11:           &amp;lt;module-option name="password-stacking"&amp;gt;useFirstPass&amp;lt;/module-option&amp;gt;  &lt;br /&gt;12:         &amp;lt;/login-module&amp;gt;  &lt;br /&gt;13:       &amp;lt;/authentication&amp;gt;  &lt;br /&gt;14:     &amp;lt;/application-policy&amp;gt;  &lt;br /&gt;15:    &lt;br /&gt;16:     &amp;lt;application-policy name="saml-validate-token"&amp;gt;  &lt;br /&gt;17:       &amp;lt;authentication&amp;gt;  &lt;br /&gt;18:         &amp;lt;login-module code="org.picketlink.identity.federation.core.wstrust.auth.STSValidatingLoginModule" flag="required"&amp;gt;  &lt;br /&gt;19:           &amp;lt;module-option name="configFile"&amp;gt;/jboss/local/502_CR3_signed/jboss-soa-p.5.0.0/jboss-as/samples/quickstarts/security_saml/picketlink-sts-client.properties&amp;lt;/module-option&amp;gt;  &lt;br /&gt;20:           &amp;lt;module-option name="useOptionsCredentials"&amp;gt;true&amp;lt;/module-option&amp;gt;  &lt;br /&gt;21:         &amp;lt;/login-module&amp;gt;  &lt;br /&gt;22:       &amp;lt;/authentication&amp;gt;  &lt;br /&gt;23:     &amp;lt;/application-policy&amp;gt;  &lt;br /&gt;24:   &amp;lt;/policy&amp;gt;  &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;What's happening in this file? We're defining security domains. Remember how we talked about the quickstart demonstrating how to either issue (produce) or validate (consume) a SAML Security Token.&amp;nbsp; Each has an applicaiton policy defined. For JBoss servers, security domains are configured with &lt;application-policy&gt; elements files named "login-config.xml."&lt;/application-policy&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Line 2 - Here's the start of the domain that is used to issue the SAML Security Token. &lt;/li&gt;&lt;li&gt;Line 4 - A reference to the STSIssuingLoginModule that we discussed earlier. &lt;/li&gt;&lt;li&gt;Line 5 - And here's a pointer to the picketlink-sts-client.properties file that we discussed a minute ago. (Yes, all these configuration files do tie together.) &lt;/li&gt;&lt;li&gt;Line 6 - The endpoint of the target web service is: http://security_saml/goodbyeworld - note that the endpointURI in STS properties is actually just the "domain" to which the security token will be applicable. Imagine you have two systems where access to one does not necessarily imply access to the other, yet they both want to use the same STS. You would look at the endpointURI to verify the token is for the relevant system. The system itself &lt;span class="Object" id="dx-w"&gt;may&lt;/span&gt; include many web services that are secured as a collective.&lt;/li&gt;&lt;li&gt;Line 7 - Each login module gets a shared map. When the "password-stacking" option is set to "useFirstPass," with this option, the login module looks for username/pass in that shared map instead of using the callback handler.&lt;/li&gt;&lt;li&gt;Line 9 - And, here's the start of the domain that is used to validate the SAML Security Token. &lt;/li&gt;&lt;li&gt;Line 16 - And here's the start of the domain that is used to validate the SAML Security Token.&lt;/li&gt;&lt;li&gt;Line 20 - What's interesting to note here is the use of the "useOptionsCredentials" login module. Unlike "password-stacking," this option causes the login module to use credentials from its properties file. In the case of our quickstart, this is the picketlink-sts-client.properties file. In this context, "true" allows the login module to store the password in the shared map, in anticipation of its later use by another login module through "useFirstPass".&lt;/li&gt;&lt;/ul&gt;OK, our login credentials are happily defined. What's next? The security domains defined in login-config are static. They are read by the server when the server is started or an application is deployed. Let's look now at the jboss-service.xml file:&lt;br /&gt;&lt;br /&gt;&lt;pre style="-moz-background-clip: -moz-initial; -moz-background-inline-policy: -moz-initial; -moz-background-origin: -moz-initial; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black;"&gt;1:  &amp;lt;server&amp;gt;  &lt;br /&gt;2:    &amp;lt;mbean code="org.jboss.security.auth.login.DynamicLoginConfig" name="org.jboss.esb.samples.quickstarts.security_saml:service=LoginModule"&amp;gt;  &lt;br /&gt;3:      &amp;lt;attribute name="AuthConfig"&amp;gt;login-config.xml&amp;lt;/attribute&amp;gt;  &lt;br /&gt;4:      &amp;lt;depends optional-attribute-name="LoginConfigService"&amp;gt;jboss.security:service=XMLLoginConfig&amp;lt;/depends&amp;gt;  &lt;br /&gt;5:      &amp;lt;depends optional-attribute-name="SecurityManagerService"&amp;gt;jboss.security:service=JaasSecurityManager&amp;lt;/depends&amp;gt;  &lt;br /&gt;6:    &amp;lt;/mbean&amp;gt;  &lt;br /&gt;7:  &amp;lt;/server&amp;gt;  &lt;br /&gt;8:    &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Line 2 - As its name indicates, org.jboss.security.auth.login.DynamicLoginConfig enables us to dynamically deploy a security domain. In the case of our quickstart, the MBean makes use of the XMLLoginConfig service (line 4) and the SecurityManagerService (line 5).&lt;/li&gt;&lt;/ul&gt;And the last of the security-related is the jboss-wsse-client.xml file. This file defines the JBoss WebService configuration that the quickstart client will use to access the web service. The configuration defined in this file will cover all requests sent by the client, and all responses received by the client. Note that this has really nothing to do with SAML/STS. The quickstart has configured the ESB service to support WS-Security UsernameToken, so that we can then use this user/password to authenticate against STS and request a token.&lt;br /&gt;&lt;br /&gt;&lt;pre style="-moz-background-clip: -moz-initial; -moz-background-inline-policy: -moz-initial; -moz-background-origin: -moz-initial; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black;"&gt;1:  &amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;  &lt;br /&gt;2:  &amp;lt;jboss-ws-security xmlns="http://www.jboss.com/ws-security/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  &lt;br /&gt;3:   xsi:schemaLocation="http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd"&amp;gt;  &lt;br /&gt;4:   &amp;lt;config&amp;gt;  &lt;br /&gt;5:     &amp;lt;username/&amp;gt;  &lt;br /&gt;6:   &amp;lt;/config&amp;gt;  &lt;br /&gt;7:  &amp;lt;/jboss-ws-security&amp;gt;  &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Lines 4-6 - This config element indicates that all requests and responses must contain a username.&lt;/li&gt;&lt;/ul&gt;&lt;div class="pParagraph"&gt;For more information on Web Service Security, see: http://docs.sun.com/source/819-0788/xwss2.html, http://community.jboss.org/wiki/WSSecurityConfig, http://community.jboss.org/wiki/jbossws-ws-securityoptions&lt;/div&gt;&lt;a href="http://www.blogger.com/post-create.g?blogID=7133180390032268932" id="wp55545" name="wp55545"&gt;&lt;/a&gt;&lt;br /&gt;&lt;b&gt;Group #2 - Test data related files&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;We discussed the soap-request.xml a few minutes ago. Let's look at the smooks-saml-injector-template.xml and smooks-saml-injector.xml files now. These files are used to transform a message, to inject the SAML assertion into a SOAP message that is sent using WS Security.&lt;br /&gt;&lt;br /&gt;As its name indicates, the smooks-saml-injector-template.xml file is a temlplate and is used by the smooks-saml-injector.xml file. Let's look at smooks-saml-injector.xml&lt;br /&gt;&lt;br /&gt;&lt;pre style="-moz-background-clip: -moz-initial; -moz-background-inline-policy: -moz-initial; -moz-background-origin: -moz-initial; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black;"&gt;1:   &amp;lt;?xml version="1.0"?&amp;gt;  &lt;br /&gt;2:   &amp;lt;smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"&amp;gt;  &lt;br /&gt;3:    &lt;br /&gt;4:     &amp;lt;import file="smooks-saml-injector-template.xml"&amp;gt;  &lt;br /&gt;5:     &amp;lt;param name="selector"&amp;gt;/Envelope/Header/Security&amp;lt;/param&amp;gt;  &lt;br /&gt;6:     &amp;lt;param name="selectorNamespace"&amp;gt;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&amp;lt;/param&amp;gt;  &lt;br /&gt;7:     &amp;lt;param name="securityNamespace"&amp;gt;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&amp;lt;/param&amp;gt;  &lt;br /&gt;8:     &amp;lt;param name="headerNamespace"&amp;gt;http://schemas.xmlsoap.org/soap/envelope/&amp;lt;/param&amp;gt;  &lt;br /&gt;9:   &amp;lt;/import&amp;gt;  &lt;br /&gt;10:      &lt;br /&gt;11:    &amp;lt;import file="smooks-saml-injector-template.xml"&amp;gt;  &lt;br /&gt;12:      &amp;lt;param name="selector"&amp;gt;/Envelope/Header&amp;lt;/param&amp;gt;  &lt;br /&gt;13:      &amp;lt;param name="selectorNamespace"&amp;gt;http://schemas.xmlsoap.org/soap/envelope/&amp;lt;/param&amp;gt;  &lt;br /&gt;14:      &amp;lt;param name="securityNamespace"&amp;gt;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd&amp;lt;/param&amp;gt;  &lt;br /&gt;15:      &amp;lt;param name="headerNamespace"&amp;gt;http://schemas.xmlsoap.org/soap/envelope/&amp;lt;/param&amp;gt;  &lt;br /&gt;16:      &amp;lt;param name="addXmlNs"&amp;gt;false&amp;lt;/param&amp;gt;  &lt;br /&gt;17:    &amp;lt;/import&amp;gt;  &lt;br /&gt;18:     &lt;br /&gt;19:   &amp;lt;/smooks-resource-list&amp;gt;  &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;What we see in this file are two separate &lt;import&gt; elements. Each defines the selector, security and header namespaces that are used to define the security domain. But, what's the reason behind the second &lt;import&gt;? And why does it refer to http://schemas.xmlsoap.org/soap/envelope instead of http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd? The reason is that sometimes there is no need to inject the namespaces as the wsse:security may be qualified already. That's the reason for the second block.&lt;br /&gt;&lt;br /&gt;Before we look at group #3 (the ESB related files), let's take a look at the web service and the web service client used by the quickstart .&lt;br /&gt;&lt;br /&gt;The web service itself is pretty basic - it's defined in GoodbyeWorldWS.java &lt;br /&gt;&lt;br /&gt;&lt;/import&gt;&lt;/import&gt;&lt;br /&gt;&lt;pre style="-moz-background-clip: -moz-initial; -moz-background-inline-policy: -moz-initial; -moz-background-origin: -moz-initial; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black;"&gt;1:   package org.jboss.soa.esb.samples.quickstart.securitysaml.webservice;  &lt;br /&gt;2:    &lt;br /&gt;3:   import javax.jws.WebService;  &lt;br /&gt;4:   import javax.jws.WebMethod;  &lt;br /&gt;5:   import javax.jws.Oneway;  &lt;br /&gt;6:   import javax.jws.WebParam;  &lt;br /&gt;7:   import javax.jws.HandlerChain;  &lt;br /&gt;8:   import javax.jws.soap.SOAPBinding;  &lt;br /&gt;9:    &lt;br /&gt;10:   import org.jboss.soa.esb.message.Message;  &lt;br /&gt;11:   import org.jboss.soa.esb.message.Body;  &lt;br /&gt;12:   import org.jboss.soa.esb.actions.ActionUtils;  &lt;br /&gt;13:   import org.jboss.soa.esb.actions.soap.SOAPProcessor;  &lt;br /&gt;14:    &lt;br /&gt;15:   @HandlerChain(file="handlerchain.xml")  &lt;br /&gt;16:   @WebService(name = "GoodbyeWorldWS", targetNamespace="http://security_saml/goodbyeworld")  &lt;br /&gt;17:   public class GoodbyeWorldWS {  &lt;br /&gt;18:    &lt;br /&gt;19:     @WebMethod  &lt;br /&gt;20:     public String sayGoodbye(@WebParam(name="message") String message) {  &lt;br /&gt;21:       Message esbMessage = SOAPProcessor.getMessage();  &lt;br /&gt;22:       System.out.println("Succesfully invoked WS!");  &lt;br /&gt;23:       System.out.println("SOAPRequest perhaps mediated by ESB:\n" + esbMessage.getBody().get());  &lt;br /&gt;24:       return "... Ah Goodbye then!!!! - " + message;  &lt;br /&gt;25:     }  &lt;br /&gt;26:    &lt;br /&gt;27:     @WebMethod  &lt;br /&gt;28:     public String sayAdios(String message) {  &lt;br /&gt;29:       Message esbMessage = SOAPProcessor.getMessage();  &lt;br /&gt;30:       if(esbMessage != null) {  &lt;br /&gt;31:         System.out.println("**** SOAPRequest perhaps mediated by ESB:\n" + esbMessage.getBody().get());  &lt;br /&gt;32:       }  &lt;br /&gt;33:       System.out.println("Web Service Parameter - message=" + message);  &lt;br /&gt;34:       return "... Adios Amigo!!!! - " + message;  &lt;br /&gt;35:     }  &lt;br /&gt;36:       &lt;br /&gt;37:     @WebMethod  &lt;br /&gt;38:     @Oneway  &lt;br /&gt;39:     public void sayGoodbyeWithoutResponse(@WebParam(name="message") String message) {  &lt;br /&gt;40:    &lt;br /&gt;41:       Message esbMessage = SOAPProcessor.getMessage();  &lt;br /&gt;42:       if(esbMessage != null) {  &lt;br /&gt;43:         System.out.println("**** SOAPRequest perhaps mediated by ESB:\n" + esbMessage.getBody().get());  &lt;br /&gt;44:       }  &lt;br /&gt;45:       System.out.println("Web Service Parameter - message=" + message);  &lt;br /&gt;46:     }  &lt;br /&gt;47:       &lt;br /&gt;48:   }  &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;If this program looks more like a POJO (a "plain old java object") with annotations than a web service, well, you're correct! &lt;br /&gt;&lt;br /&gt;One of the features of the JBossESB in the SOA Platform is how it enables you to easily expose a web service's endpoints on the ESB. To do this, you write a "service wrapper webservice" that conforms to the JSR 181 ("Web Services Metadata for the Java Platform") standard. JSR 181 enables you to create webservices from a POJO by adding annotations such as @WebService and @WebMethod to it. This service wrapper webservice wraps calls to your service and exposes that service through JBossESB listeners. Your service can also be accessed through other transports (FTP, JMS, etc.) supported by the JBossESB in the SOA Platform. These 3 types of JBossWS webservice endpoints can be exposed through JBoss ESB listeners using this action: &lt;br /&gt;&lt;ul&gt;&lt;li&gt;Webservice bundled into a JBossESB .esb archive - When the webservice .war is bundled into a deployed .esb archive&lt;/li&gt;&lt;li&gt;Webservice bundled into an .ear - When the .war is bundled into a deployed .ear&lt;/li&gt;&lt;li&gt;Standalone webservice - When the webservice .war is deployed&lt;/li&gt;&lt;/ul&gt;When we examine the jboss-esb.xml file, we'll see that the JBossESB's SOAPProcessor (org.jboss.soa.esb.actions.soap.SOAPProcessor) is used to expose the web service's -endpoints. &lt;br /&gt;&lt;br /&gt;But wait, there's more!&lt;br /&gt;&lt;br /&gt;On line 15, we see this annotation:&amp;nbsp; @HandlerChain(file="handlerchain.xml")&lt;br /&gt;&lt;br /&gt;A handler is a message interceptor to do processing of incoming and outgoing messages. SOAP handlers provide methods to access SOAP messages.&lt;br /&gt;A HandlerChain is a list of handlers. The handlerchain referenced on line 15 is defined as follows in the handlerchain.xml file.&lt;br /&gt;&lt;br /&gt;&lt;pre style="-moz-background-clip: -moz-initial; -moz-background-inline-policy: -moz-initial; -moz-background-origin: -moz-initial; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black;"&gt;1:   &amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;  &lt;br /&gt;2:   &amp;lt;jws:handler-config xmlns:jws="http://java.sun.com/xml/ns/javaee"&amp;gt;  &lt;br /&gt;3:       &amp;lt;jws:handler-chains&amp;gt;  &lt;br /&gt;4:           &amp;lt;jws:handler-chain&amp;gt;  &lt;br /&gt;5:               &amp;lt;jws:handler&amp;gt;  &lt;br /&gt;6:                   &amp;lt;jws:handler-class&amp;gt;org.picketlink.identity.federation.core.wstrust.handlers.STSSaml20Handler&amp;lt;/jws:handler-class&amp;gt;  &lt;br /&gt;7:               &amp;lt;/jws:handler&amp;gt;  &lt;br /&gt;8:           &amp;lt;/jws:handler-chain&amp;gt;  &lt;br /&gt;9:       &amp;lt;/jws:handler-chains&amp;gt;  &lt;br /&gt;10:   &amp;lt;/jws:handler-config&amp;gt;  &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Line 6 - What's interesting in this file is line 6. The org.picketlink.identity.federation.core.wstrust.handlers.STSSaml20Handler handler class enables the quickstart to insert the SAML security assertion into the message as it is processed by the web service.&lt;/li&gt;&lt;/ul&gt;OK. That's the web service. Now let's look at the quickstart's client code in HttpClient.java&lt;br /&gt;&lt;br /&gt;&lt;pre style="-moz-background-clip: -moz-initial; -moz-background-inline-policy: -moz-initial; -moz-background-origin: -moz-initial; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black;"&gt;1:  package org.jboss.soa.esb.samples.quickstart.securitysaml.test;  &lt;br /&gt;2:    &lt;br /&gt;3:  import org.jboss.remoting.Client;  &lt;br /&gt;4:  import org.jboss.remoting.InvokerLocator;  &lt;br /&gt;5:  import org.jboss.internal.soa.esb.util.StreamUtils;  &lt;br /&gt;6:  import org.jboss.remoting.transport.http.HTTPMetadataConstants;  &lt;br /&gt;7:    &lt;br /&gt;8:  import java.util.HashMap;  &lt;br /&gt;9:  import java.util.Map;  &lt;br /&gt;10:    &lt;br /&gt;11:  public class HttpClient  &lt;br /&gt;12:  {  &lt;br /&gt;13:    // Default locator values  &lt;br /&gt;14:    private static String transport = "http";  &lt;br /&gt;15:    private static String host = "localhost";  &lt;br /&gt;16:    private static int port = 5400;  &lt;br /&gt;17:    private static String payload;  &lt;br /&gt;18:    &lt;br /&gt;19:    public void makeInvocation(String locatorURI) throws Throwable  &lt;br /&gt;20:    {  &lt;br /&gt;21:     InvokerLocator locator = new InvokerLocator(locatorURI);  &lt;br /&gt;22:     System.out.println("Calling remoting server with locator uri of: " + locatorURI);  &lt;br /&gt;23:    &lt;br /&gt;24:     Client remotingClient = new Client(locator);  &lt;br /&gt;25:     remotingClient.connect();  &lt;br /&gt;26:    &lt;br /&gt;27:     Map metadata = new HashMap();  &lt;br /&gt;28:     metadata.put("TYPE", "POST");  &lt;br /&gt;29:     remotingClient.invokeOneway(payload, metadata );  &lt;br /&gt;30:    &lt;br /&gt;31:     System.out.println("Sent http post to server.");  &lt;br /&gt;32:     Integer responseCode = (Integer) metadata.get(HTTPMetadataConstants.RESPONSE_CODE);  &lt;br /&gt;33:     String responseMessage = (String) metadata.get(HTTPMetadataConstants.RESPONSE_CODE_MESSAGE);  &lt;br /&gt;34:     System.out.println("Response code from server: " + responseCode);  &lt;br /&gt;35:     System.out.println("Response message from server: " + responseMessage);  &lt;br /&gt;36:     remotingClient.disconnect();  &lt;br /&gt;37:    &lt;br /&gt;38:    }  &lt;br /&gt;39:    &lt;br /&gt;40:    public static void main(String[] args) throws Exception  &lt;br /&gt;41:    {  &lt;br /&gt;42:     if(args != null &amp;amp;&amp;amp; args.length == 4)  &lt;br /&gt;43:     {  &lt;br /&gt;44:       transport = args[0];  &lt;br /&gt;45:       host = args[1];  &lt;br /&gt;46:       port = Integer.parseInt(args[2]);  &lt;br /&gt;47:           payload = StreamUtils.getResourceAsString(args[3], "UTF-8");  &lt;br /&gt;48:     }  &lt;br /&gt;49:     String locatorURI = transport + "://" + host + ":" + port;  &lt;br /&gt;50:     HttpClient client = new HttpClient();  &lt;br /&gt;51:     try  &lt;br /&gt;52:     {  &lt;br /&gt;53:       client.makeInvocation(locatorURI);  &lt;br /&gt;54:     }  &lt;br /&gt;55:     catch(Throwable e)  &lt;br /&gt;56:     {  &lt;br /&gt;57:       e.printStackTrace();  &lt;br /&gt;58:     }  &lt;br /&gt;59:    }  &lt;br /&gt;60:  }  &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;There's nothing unusual here as the client simply sends an HTTP POST request to a target URL. How does this client get executed? Through this target defined in the build.xml file.&lt;br /&gt;&lt;br /&gt;&lt;pre style="-moz-background-clip: -moz-initial; -moz-background-inline-policy: -moz-initial; -moz-background-origin: -moz-initial; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black;"&gt;1:  &amp;lt;target name="runtest" depends="compile"  &lt;br /&gt;2:   description="sends a HTTP request to the JBossRemoting gateway"&amp;gt;  &lt;br /&gt;3:    &amp;lt;echo&amp;gt;Http Client&amp;lt;/echo&amp;gt;  &lt;br /&gt;4:   &amp;lt;java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.securitysaml.test.HttpClient" failonerror="true"&amp;gt;  &lt;br /&gt;5:     &amp;lt;arg value="http"/&amp;gt;  &lt;br /&gt;6:     &amp;lt;arg value="localhost"/&amp;gt;  &lt;br /&gt;7:     &amp;lt;arg value="9888"/&amp;gt;  &lt;br /&gt;8:     &amp;lt;arg value="soap-request.xml"/&amp;gt;  &lt;br /&gt;9:     &amp;lt;classpath refid="exec-classpath"/&amp;gt;  &lt;br /&gt;10:   &amp;lt;/java&amp;gt;  &lt;br /&gt;11:  &amp;lt;/target&amp;gt;  &lt;br /&gt;12:    &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Line 7 - OK. There's nothing unusual here either. Or, is there? Look at line #7. Where did port 9888 get defined? After all, the the server is running on port 8080. We'll find the answer when we examine the quickstart's jboss-esb.xml file next.&lt;/li&gt;&lt;/ul&gt;(And, last of all, the DisplaySubjectAction.java class is a customer ESB action called by services to display the javax.security.auth.Subject extracted from the message.)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Group #3 - ESB archive related files &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The deployment.xml, jbm-queue-service.xml, and jbmq-queue-service.xml files all reference the JMS queues and topics that will be needed by the quickstart. The jbossesb-properties.xml file is used to define properties used by the quickstart and to over-ride server-wide settings.&lt;br /&gt;&lt;br /&gt;The file that we want to look at in detail is jboss-esb.xml. This file defines the quickstart's services configuration, including listeners and actions, and the providers.&lt;br /&gt;&lt;br /&gt;(Note that while we'll be examining most of the contents of the jboss-esb.xml file in detail, we'll be doing it in pieces or fragments so that it's easier to follow. The line numbers in each of these fragments will therefore be different from the actual (whole) file.)&lt;br /&gt;&lt;br /&gt;Let's start with the providers. As the name indicates, these elements define resources provided by by the ESB to the quickstart.&lt;br /&gt;&lt;br /&gt;&lt;pre style="-moz-background-clip: -moz-initial; -moz-background-inline-policy: -moz-initial; -moz-background-origin: -moz-initial; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black;"&gt;1:  &amp;lt;providers&amp;gt;  &lt;br /&gt;2:     &amp;lt;jms-provider name="JBossMessaging" connection-factory="ConnectionFactory"&amp;gt;  &lt;br /&gt;3:       &amp;lt;jms-bus busid="quickstartGatewayChannel"&amp;gt;  &lt;br /&gt;4:         &amp;lt;jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_security_saml_gw"/&amp;gt;  &lt;br /&gt;5:      &amp;lt;/jms-bus&amp;gt;  &lt;br /&gt;6:      &amp;lt;jms-bus busid="quickstartEsbChannel"&amp;gt;  &lt;br /&gt;7:        &amp;lt;jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_security_saml_esb"/&amp;gt;  &lt;br /&gt;8:      &amp;lt;/jms-bus&amp;gt;  &lt;br /&gt;9:    &amp;lt;/jms-provider&amp;gt;  &lt;br /&gt;10:      &lt;br /&gt;11:     &amp;lt;jbr-provider name="JBR-Http" protocol="http" host="localhost"&amp;gt;  &lt;br /&gt;12:          &amp;lt;jbr-bus busid="Http-1" port="9888" /&amp;gt;  &lt;br /&gt;13:     &amp;lt;/jbr-provider&amp;gt;  &lt;br /&gt;14:      &lt;br /&gt;15:  &amp;lt;/providers&amp;gt;  &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Line 2 - Here's the start of the JMS provider. This is where we will see the definitions of JMS queues and topics. &lt;/li&gt;&lt;li&gt;Line 3 - Note that each queue has a "busid" value defined for it. We'll see the busid's used in the service definitions in a moment.&lt;/li&gt;&lt;li&gt;Line 7 - Remember how we discussed how each ESB-unaware queue required a corresponding ESB-aware queue to be defined? &lt;/li&gt;&lt;li&gt;Line 11 - This is the definition for a JBoss remoting provider. This makes use of JBoss Remoting (JBR) into JBoss ESB as a transport option and supports HTTP (and SSL, which we're not using in this quickstart). What's interesting here is that the jbr-provider enables us to define the port (remember how we saw the reference to port 9888 in the "runtest" ant target in the build.xml file?) that the provider provides (pardon the pun) to a service.&lt;/li&gt;&lt;/ul&gt;The remainder of the jboss-esb.xml file defines the quickstart's (3) services. We'll look at the configuration of the services now, and then we'll look at the actual operation of the services when we walk through what happens when we run the quickstart.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="-moz-background-clip: -moz-initial; -moz-background-inline-policy: -moz-initial; -moz-background-origin: -moz-initial; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black;"&gt;1:  &amp;lt;service category="SamlSecurityQuickstart" name="issueTokenService"  &lt;br /&gt;2:      invmScope="GLOBAL"  &lt;br /&gt;3:      description="This service demonstrates how a service can be configured to issue and validate a security token"&amp;gt;  &lt;br /&gt;4:      &lt;br /&gt;5:      &amp;lt;security moduleName="saml-issue-token" callbackHandler="org.jboss.soa.esb.services.security.auth.login.JBossSTSIssueCallbackHandler"&amp;gt;  &lt;br /&gt;6:        &amp;lt;!-- disable the security context timeout so that our security context is re-evaluated --&amp;gt;  &lt;br /&gt;7:        &amp;lt;property name="org.jboss.soa.esb.services.security.contextTimeout" value="0"/&amp;gt;  &lt;br /&gt;8:      &amp;lt;/security&amp;gt;  &lt;br /&gt;9:      &lt;br /&gt;10:     &amp;lt;listeners&amp;gt;  &lt;br /&gt;11:       &amp;lt;jms-listener name="JMSGatewayListener" busidref="quickstartGatewayChannel" is-gateway="true"/&amp;gt;  &lt;br /&gt;12:         &amp;lt;jbr-listener name="Http-Gateway" busidref="Http-1" is-gateway="true"&amp;gt;  &lt;br /&gt;13:           &amp;lt;property name="synchronous" value="false"/&amp;gt;  &lt;br /&gt;14:         &amp;lt;/jbr-listener&amp;gt;  &lt;br /&gt;15:    &amp;lt;/listeners&amp;gt;  &lt;br /&gt;16:     &lt;br /&gt;17:   &amp;lt;actions mep="OneWay"&amp;gt;  &lt;br /&gt;18:      &lt;br /&gt;19:      &amp;lt;!-- Uncomment if you'd like to print the current Subject  &lt;br /&gt;20:        &amp;lt;action name="printSubject" class="org.jboss.soa.esb.samples.quickstart.securitysaml.DisplaySubjectAction"/&amp;gt;  &lt;br /&gt;21:        --&amp;gt;  &lt;br /&gt;22:       &lt;br /&gt;23:      &amp;lt;action name="routeAction" class="org.jboss.soa.esb.actions.StaticRouter"&amp;gt;  &lt;br /&gt;24:        &amp;lt;property name="destinations"&amp;gt;  &lt;br /&gt;25:          &amp;lt;route-to service-category="SamlSecurityQuickstart" service-name="securedSamlService"/&amp;gt;  &lt;br /&gt;26:        &amp;lt;/property&amp;gt;  &lt;br /&gt;27:      &amp;lt;/action&amp;gt;  &lt;br /&gt;28:      &lt;br /&gt;29:    &amp;lt;/actions&amp;gt;  &lt;br /&gt;30:  &amp;lt;/service&amp;gt;  &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Line 1: Service name and category are used to differentiate the services. Every service has a category and name attribute. JBossESB uses these attributes to register a service's listeners (gateway listeners or ESB-aware listeners) endpoints in a service registry. &lt;/li&gt;&lt;li&gt;Line 2 - The InVM transport enables services to communicate using the same JVM and without having to go through a second non-gateway provider. This makes things more efficient as the services don't have use any networking protocols between JVM instances. The "GLOBAL" value indicates that the this service can be invoked using the InVM transport using the same JVM.&lt;/li&gt;&lt;li&gt;Line 5 - Remember how we defined the appplication-policy name in login-config.xml?&amp;nbsp; (Hint: The policy name was "saml-issue-token.") That's right. This is the moduleName. &lt;span class="term"&gt;The callbackHandler defined here overrides the one defined in jbossesb-properties.xml. Remember that the username and password can be provided by a callback. In the case of this service the callback is JBossSTSIssueCallbackHandler.&amp;nbsp; The callback handler retreives the username and password of the user for whom a security token should be issued.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Line 7 - Setting the org.jboss.soa.esb.services.security.contextTimeout property to zero ensures that every time the service is invoked the security context is re-evaluated.&lt;/li&gt;&lt;li&gt;Line 10 - Here's where the definition of the services listeners begins. These are well-named as they "listen" for incoming messages, based on the designated queue and protocol.&lt;/li&gt;&lt;li&gt;Line 12 - Remember how we reviewed the "Http-1" busidref in the "providers" section of the jboss-esb file? Well, here's where it's used. The JMS queue associated with this busidref is "listened to" for incoming messages. When a message is received, the service's action pipeline (in this case a pipeline of only one action) is executed. The reference to "gateway" indicates that the message originates outside of the ESB and is passed into the ESD through this "gateway."&lt;/li&gt;&lt;li&gt;Line 17 - The service's actions' definitions start here. The message exchange pattern (or "mep" for short) is asynchronous as the service will not wait for a response before moving on.&lt;/li&gt;&lt;li&gt;Line 20 - We'll uncomment this line later on so we can see the security subject displayed in the server log.&lt;/li&gt;&lt;li&gt;Line 25 - What happens to the message after the service issues the security assert? It's routed to the next service defined in the jboss-esb.xml file. In this case it's a static route, but the ESB actually supports other routing options too, including content based routing. (http://jboss-soa-p.blogspot.com/2009/07/when-content-knows-way-content-based.html)&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;Next, let's look at the service to which the first service routes messages.&lt;br /&gt;&lt;br /&gt;&lt;pre style="-moz-background-clip: -moz-initial; -moz-background-inline-policy: -moz-initial; -moz-background-origin: -moz-initial; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black;"&gt;1:  &amp;lt;service category="SamlSecurityQuickstart" name="securedSamlService"  &lt;br /&gt;2:    invmScope="GLOBAL"  &lt;br /&gt;3:    description="This service demonstrates that an ESB service can be configured to only validate a security token."&amp;gt;  &lt;br /&gt;4:      &lt;br /&gt;5:    &amp;lt;security moduleName="saml-validate-token" callbackHandler="org.jboss.soa.esb.services.security.auth.login.JBossSTSTokenCallbackHandler"&amp;gt;  &lt;br /&gt;6:        &amp;lt;!-- disable the security context timeout so that our security context is re-evaluated --&amp;gt;  &lt;br /&gt;7:        &amp;lt;property name="org.jboss.soa.esb.services.security.contextTimeout" value="0"/&amp;gt;  &lt;br /&gt;8:    &amp;lt;/security&amp;gt;  &lt;br /&gt;9:      &lt;br /&gt;10:    &amp;lt;actions mep="OneWay"&amp;gt;  &lt;br /&gt;11:      &lt;br /&gt;12:      &amp;lt;!-- Uncomment if you'd like to print the current Subject  &lt;br /&gt;13:         &amp;lt;action name="printSubject" class="org.jboss.soa.esb.samples.quickstart.securitysaml.DisplaySubjectAction"/&amp;gt;  &lt;br /&gt;14:      --&amp;gt;  &lt;br /&gt;15:      &lt;br /&gt;16:      &amp;lt;action name="routeAction" class="org.jboss.soa.esb.actions.StaticRouter"&amp;gt;  &lt;br /&gt;17:        &amp;lt;property name="destinations"&amp;gt;  &lt;br /&gt;18:          &amp;lt;route-to service-category="SamlSecurityQuickstart" service-name="sendExternal"/&amp;gt;  &lt;br /&gt;19:        &amp;lt;/property&amp;gt;  &lt;br /&gt;20:     &amp;lt;/action&amp;gt;  &lt;br /&gt;21:      &lt;br /&gt;22:    &amp;lt;/actions&amp;gt;  &lt;br /&gt;23:  &amp;lt;/service&amp;gt;  &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;There are two interesting lines in this service definition.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Line 5 - In contrast to the first service, this service uses the org.jboss.soa.esb.services.security.auth.login.JBossSTSTokenCallbackHandler class as a call back handler.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Line 18 - Routes the message to the next service. &lt;/li&gt;&lt;/ul&gt;&lt;pre style="-moz-background-clip: -moz-initial; -moz-background-inline-policy: -moz-initial; -moz-background-origin: -moz-initial; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black;"&gt;1:  &amp;lt;service category="SamlSecurityQuickstart" name="sendExternal"  &lt;br /&gt;2:    invmScope="GLOBAL"  &lt;br /&gt;3:    description="This service demonstrates that an ESB service can be configured to only validate a security token and call an external WS with the security token."&amp;gt;  &lt;br /&gt;4:      &lt;br /&gt;5:    &amp;lt;security moduleName="saml-validate-token" callbackHandler="org.jboss.soa.esb.services.security.auth.login.JBossSTSTokenCallbackHandler"/&amp;gt;  &lt;br /&gt;6:      &lt;br /&gt;7:    &amp;lt;actions mep="OneWay"&amp;gt;  &lt;br /&gt;8:      &lt;br /&gt;9:      &amp;lt;!-- Uncomment if you'd like to print the current Subject  &lt;br /&gt;10:       &amp;lt;action name="printSubject" class="org.jboss.soa.esb.samples.quickstart.securitysaml.DisplaySubjectAction"/&amp;gt;  &lt;br /&gt;11:     --&amp;gt;  &lt;br /&gt;12:      &lt;br /&gt;13:     &amp;lt;action name="addSamlSecurityHeader" class="org.jboss.soa.esb.smooks.SmooksAction"&amp;gt;  &lt;br /&gt;14:       &amp;lt;property name="smooksConfig" value="/smooks/smooks-saml-injector.xml" /&amp;gt;  &lt;br /&gt;15:     &amp;lt;/action&amp;gt;  &lt;br /&gt;16:      &lt;br /&gt;17:     &amp;lt;action name="JBossWSAdapter" class="org.jboss.soa.esb.actions.soap.SOAPProcessor"&amp;gt;  &lt;br /&gt;18:       &amp;lt;property name="jbossws-endpoint" value="GoodbyeWorldWS"/&amp;gt;  &lt;br /&gt;19:     &amp;lt;/action&amp;gt;  &lt;br /&gt;20:      &lt;br /&gt;21:   &amp;lt;/actions&amp;gt;  &lt;br /&gt;22:  &amp;lt;/service&amp;gt;  &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;What's different from the second service in this service is:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Lines 13-15 - This action invokes the Smooks script to inject the SAML assert into the message.&lt;/li&gt;&lt;li&gt;Lines 17-18 - And finally, the target web service is invoked via the org.jboss.soa.esb.actions.soap.SOAPProcessor out of the box JBossESB action.&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;Running the Quickstart&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;OK - let's run the quickstart and watch it in action. Running the quickstarts is a deceptively simple task in that they generally requires only a small number of steps to execute. In the case of the security_saml quickstart, we only have to execute these (2) ant commands:&lt;br /&gt;&lt;br /&gt;&lt;pre style="-moz-background-clip: -moz-initial; -moz-background-inline-policy: -moz-initial; -moz-background-origin: -moz-initial; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black;"&gt;1:  ant deploy  &lt;br /&gt;2:  ant runtest  &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;But - hang on &amp;nbsp;- let's examine in detail just what each command actually does.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;ant deploy&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Many of the quickstarts require some "set up" work in order to run. In the case of the security_saml quickstart this set up involves deploying not only the quickstart, but also the PicketLink Security Token Server (STS) .war file that is included in the quickstart. Here's the deploy target in the quickstart's build.xml file.&lt;br /&gt;&lt;br /&gt;&lt;pre style="-moz-background-clip: -moz-initial; -moz-background-inline-policy: -moz-initial; -moz-background-origin: -moz-initial; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black;"&gt;1:  &amp;lt;target name="quickstart-specific-predeploys"&amp;gt;  &lt;br /&gt;2:    &amp;lt;copy file="${basedir}/picketlink-sts.war" todir="${org.jboss.esb.server.deploy.dir}"/&amp;gt;  &lt;br /&gt;3:  &amp;lt;/target&amp;gt;  &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Here's the server log when the quickstart is deployed.&lt;br /&gt;&lt;br /&gt;&lt;pre style="-moz-background-clip: -moz-initial; -moz-background-inline-policy: -moz-initial; -moz-background-origin: -moz-initial; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black;"&gt;1:  23:04:13,512 INFO [TomcatDeployment] undeploy, ctxPath=/Quickstart_Security_Saml  &lt;br /&gt;2:  23:04:13,547 INFO [EsbDeployment] Stopping 'Quickstart_Security_Saml.esb'  &lt;br /&gt;3:  23:04:13,837 INFO [Http11Protocol] Stopping Coyote HTTP/1.1 on http-localhost%2F127.0.0.1-9888  &lt;br /&gt;4:  23:04:13,844 INFO [JBossRemotingGatewayListener] JBoss Remoting Gateway listener 'listener' stopped.  &lt;br /&gt;5:  23:04:14,075 INFO [EsbDeployment] Destroying 'Quickstart_Security_Saml.esb'  &lt;br /&gt;6:  23:04:14,075 WARN [ServiceMessageCounterLifecycleResource] Calling cleanup on existing service message counters for identity ID-6  &lt;br /&gt;7:  23:04:14,075 WARN [SmooksResource] Closing smooks resources for identity ID-6  &lt;br /&gt;8:  23:04:14,213 INFO [QueueService] Queue[/queue/quickstart_security_saml_esb_reply] stopped  &lt;br /&gt;9:  23:04:14,215 INFO [QueueService] Queue[/queue/quickstart_security_saml_esb] stopped  &lt;br /&gt;10:  23:04:14,216 INFO [QueueService] Queue[/queue/quickstart_security_saml_gw] stopped  &lt;br /&gt;11:  23:04:14,487 INFO [QueueService] Queue[/queue/quickstart_security_saml_gw] started, fullSize=200000, pageSize=2000, downCacheSize=2000  &lt;br /&gt;12:  23:04:14,518 INFO [QueueService] Queue[/queue/quickstart_security_saml_esb] started, fullSize=200000, pageSize=2000, downCacheSize=2000  &lt;br /&gt;13:  23:04:14,550 INFO [QueueService] Queue[/queue/quickstart_security_saml_esb_reply] started, fullSize=200000, pageSize=2000, downCacheSize=2000  &lt;br /&gt;14:  23:04:14,571 INFO [EsbDeployment] Starting ESB Deployment 'Quickstart_Security_Saml.esb'  &lt;br /&gt;15:  23:04:15,870 INFO [CoyoteInvoker] Using org.apache.coyote.http11.Http11Protocol for http (coyote) invoker protocol handler.  &lt;br /&gt;16:  23:04:15,871 INFO [Http11Protocol] Initializing Coyote HTTP/1.1 on http-localhost%2F127.0.0.1-9888  &lt;br /&gt;17:  23:04:15,871 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-localhost%2F127.0.0.1-9888  &lt;br /&gt;18:  23:04:15,871 INFO [JBossRemotingGatewayListener] JBoss Remoting Gateway listener 'listener' started.  &lt;br /&gt;19:  23:04:16,090 INFO [TomcatDeployment] deploy, ctxPath=/Quickstart_Security_Saml  &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Remember the JBoss Remoting Gateway that we configured to run on port 9888? Here it is:&lt;br /&gt;&lt;br /&gt;&lt;pre style="-moz-background-clip: -moz-initial; -moz-background-inline-policy: -moz-initial; -moz-background-origin: -moz-initial; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black;"&gt;1:  23:04:15,871 INFO [Http11Protocol] Initializing Coyote HTTP/1.1 on http-localhost%2F127.0.0.1-9888  &lt;br /&gt;2:  23:04:15,871 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-localhost%2F127.0.0.1-9888  &lt;br /&gt;3:  23:04:15,871 INFO [JBossRemotingGatewayListener] JBoss Remoting Gateway listener 'listener' started.  &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;OK, let's run the quickstart and watch it in action!&lt;br /&gt;&lt;br /&gt;&lt;pre style="-moz-background-clip: -moz-initial; -moz-background-inline-policy: -moz-initial; -moz-background-origin: -moz-initial; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black;"&gt;1:  runtest:  &lt;br /&gt;2:     [echo] Http Client  &lt;br /&gt;3:     [java] Calling remoting server with locator uri of: http://localhost:9888  &lt;br /&gt;4:     [java] Sent http post to server.  &lt;br /&gt;5:     [java] Response code from server: 200  &lt;br /&gt;6:     [java] Response message from server: OK  &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Well - that's a bit anti-climatic after all this setup work. Let's and take a more in-depth look at what just happened.&lt;br /&gt;&lt;br /&gt;The quickstart begins by sending a message to the JBR-remoting gateway that we defined on port 9888. We can see this in the build.xml file:&lt;br /&gt;&lt;br /&gt;&lt;pre style="-moz-background-clip: -moz-initial; -moz-background-inline-policy: -moz-initial; -moz-background-origin: -moz-initial; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black;"&gt;1:  &amp;lt;target name="runtest" depends="compile"  &lt;br /&gt;2:    description="sends a HTTP request to the JBossRemoting gateway"&amp;gt;  &lt;br /&gt;3:    &amp;lt;echo&amp;gt;Http Client&amp;lt;/echo&amp;gt;  &lt;br /&gt;4:    &amp;lt;java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.securitysaml.test.HttpClient" failonerror="true"&amp;gt;  &lt;br /&gt;5:       &amp;lt;arg value="http"/&amp;gt;  &lt;br /&gt;6:       &amp;lt;arg value="localhost"/&amp;gt;  &lt;br /&gt;7:       &amp;lt;arg value="9888"/&amp;gt;  &lt;br /&gt;8:       &amp;lt;arg value="soap-request.xml"/&amp;gt;  &lt;br /&gt;9:       &amp;lt;classpath refid="exec-classpath"/&amp;gt;  &lt;br /&gt;10:    &amp;lt;/java&amp;gt;  &lt;br /&gt;11:  &amp;lt;/target&amp;gt;  &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;At this point, we'll un-comment the lines in the jboss-esb.xml file that invoke the org.jboss.soa.esb.samples.quickstart.securitysaml.DisplaySubjectAction - and we'll restart the server with logging set to the DEBUG level. If you spend your time developing or testing software, then the ability to "up" the logging level provides you with a goal mine of potential debugging information. Note that for the purposes of this essay, we'll look at selected log messages as logging at the DEBUG level can be very(!) verbose.&lt;br /&gt;&lt;br /&gt;The first service defined in the jboss-esb.xml ("issueTokenService") file is located:&lt;br /&gt;&lt;br /&gt;&lt;pre style="-moz-background-clip: -moz-initial; -moz-background-inline-policy: -moz-initial; -moz-background-origin: -moz-initial; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black;"&gt;1:  2010-09-07 20:46:43,801 DEBUG [org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl] (JBossRemoting Server Oneway(3)-1) Going to query the registry for name pattern [issueTokenService]  &lt;br /&gt;2:  2010-09-07 20:46:43,898 DEBUG [org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl] (JBossRemoting Server Oneway(3)-1) Service name: issueTokenService  &lt;br /&gt;3:  2010-09-07 20:46:43,898 DEBUG [org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl] (JBossRemoting Server Oneway(3)-1) Description: This service demonstrates how a service can be configured  &lt;br /&gt;4:   to issue and validate a security token  &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;The incoming message is received by the JBR gateway:&lt;br /&gt;&lt;br /&gt;&lt;pre style="-moz-background-clip: -moz-initial; -moz-background-inline-policy: -moz-initial; -moz-background-origin: -moz-initial; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black;"&gt;1:  2010-09-07 20:46:43,898 DEBUG [org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl] (JBossRemoting Server Oneway(3)-1) Key id: uddi:juddi.apache.org:1e71f7ae-e72d-4a38-a39c-cad7c1b1d250  &lt;br /&gt;2:  2010-09-07 20:46:43,900 DEBUG [org.jboss.soa.esb.client.ServiceInvoker] (JBossRemoting Server Oneway(3)-1) EPR=InVMEpr [ PortReference &amp;lt; &amp;lt;wsa:Address  &lt;br /&gt;3:  invm://53616d6c5365637572697479517569636b73746172742424242424242424242424246973737565546f6b656e53657276696365/false?false#10000/&amp;gt;, &amp;lt;wsa:ReferenceProperties jbossesb:passByValue :  &lt;br /&gt;4:  false/&amp;gt;, &amp;lt;wsa:ReferenceProperties jbossesb:type : urn:jboss/esb/epr/type/invm/&amp;gt; &amp;gt; ] XML=&amp;lt;wsa:From xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"&amp;gt;&amp;lt;wsa:Address&amp;gt;invm:  &lt;br /&gt;5:  //53616d6c5365637572697479517569636b73746172742424242424242424242424246973737565546f6b656e53657276696365/false?false#10000&amp;lt;/wsa:Address&amp;gt;&amp;lt;wsa:ReferenceProperties&amp;gt;  &lt;br /&gt;6:  &amp;lt;jbossesb:passByValue xmlns:jbossesb="http://schemas.jboss.com/ws/2007/01/jbossesb"&amp;gt;false&amp;lt;/jbossesb:passByValue&amp;gt;&amp;lt;jbossesb:type xmlns:jbossesb="http://schemas.jboss.com/ws/2007  &lt;br /&gt;7:  /01/jbossesb"&amp;gt;urn:jboss/esb/epr/type/invm&amp;lt;/jbossesb:type&amp;gt;&amp;lt;/wsa:ReferenceProperties&amp;gt;&amp;lt;/wsa:From&amp;gt;  &lt;br /&gt;8:  2010-09-07 20:46:43,907 DEBUG [org.jboss.soa.esb.client.ServiceInvoker] (JBossRemoting Server Oneway(3)-1) EPR=EPR: PortReference &amp;lt; &amp;lt;wsa:Address http://localhost:9888/&amp;gt; &amp;gt; XML=&amp;lt;wsa:From  &lt;br /&gt;9:  xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"&amp;gt;&amp;lt;wsa:Address&amp;gt;http://localhost:9888&amp;lt;/wsa:Address&amp;gt;&amp;lt;/wsa:From&amp;gt;  &lt;br /&gt;10:  2010-09-07 20:46:43,924 DEBUG [org.jboss.soa.esb.filter.FilterManager] (JBossRemoting Server Oneway(3)-1) FilterManager calling org.jboss.internal.soa.esb.message.filter.MetaDataFilter@8e85e1.onOutput  &lt;br /&gt;11:  2010-09-07 20:46:43,924 DEBUG [org.jboss.soa.esb.filter.FilterManager] (JBossRemoting Server Oneway(3)-1) FilterManager calling org.jboss.internal.soa.esb.message.filter.GatewayFilter@f77a23.onOutput  &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;And the message is passed to the ESB-aware queue:&lt;br /&gt;&lt;br /&gt;&lt;pre style="-moz-background-clip: -moz-initial; -moz-background-inline-policy: -moz-initial; -moz-background-origin: -moz-initial; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black;"&gt;1:  2010-09-07 20:46:43,924 DEBUG [org.jboss.internal.soa.esb.couriers.transport.InVMTransport] (JBossRemoting Server Oneway(3)-1) Delivering message to 53616d6c5365637572697479517569636b73746172742424242424242424242424246973737565546f6b656e53657276696365  &lt;br /&gt;2:  2010-09-07 20:46:43,924 DEBUG [org.jboss.internal.soa.esb.couriers.transport.InVMTransport] (JBossRemoting Server Oneway(3)-1) Delivering message direct to 53616d6c5365637572697479517569636b73746172742424242424242424242424246973737565546f6b656e53657276696365 queue  &lt;br /&gt;3:  2010-09-07 20:46:43,926 DEBUG [org.jboss.internal.soa.esb.couriers.transport.InVMTransport] (Thread-29) Pickup of message from 53616d6c5365637572697479517569636b73746172742424242424242424242424246973737565546f6b656e53657276696365  &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;The assert is created:&lt;br /&gt;&lt;br /&gt;&lt;pre style="-moz-background-clip: -moz-initial; -moz-background-inline-policy: -moz-initial; -moz-background-origin: -moz-initial; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black;"&gt;1:  2010-09-07 20:46:46,078 DEBUG [org.picketlink.identity.federation.core.wstrust.auth.AbstractSTSLoginModule] (pool-24-thread-1) Added Credential :SamlCredential[&amp;lt;Assertion  &lt;br /&gt;2:  xmlns="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:ns2="http://www.w3.org/2001/04/xmlenc#" xmlns:ns3="http://www.w3.org/2000/09/xmldsig#" ID="ID_bc96b4b9-0743-49ca-8e32-b0bd3cd80185"  &lt;br /&gt;3:  IssueInstant="2010-09-08T00:46:45.294Z" Version="2.0"&amp;gt;&amp;lt;Issuer xmlns="urn:oasis:names:tc:SAML:2.0:assertion"&amp;gt;PicketLinkSTS&amp;lt;/Issuer&amp;gt;&amp;lt;Subject xmlns="urn:oasis:names:tc:SAML:2.0:assertion"&amp;gt;&amp;lt;NameID  &lt;br /&gt;4:   NameQualifier="urn:picketlink:identity-federation" xmlns="urn:oasis:names:tc:SAML:2.0:assertion"&amp;gt;admin&amp;lt;/NameID&amp;gt;&amp;lt;SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer"  &lt;br /&gt;5:  xmlns="urn:oasis:names:tc:SAML:2.0:assertion"/&amp;gt;&amp;lt;/Subject&amp;gt;&amp;lt;Conditions NotBefore="2010-09-08T00:46:45.294Z" NotOnOrAfter="2010-09-08T02:46:45.294Z"  &lt;br /&gt;6:  xmlns="urn:oasis:names:tc:SAML:2.0:assertion"&amp;gt;&amp;lt;AudienceRestriction xmlns="urn:oasis:names:tc:SAML:2.0:assertion"&amp;gt;&amp;lt;Audience xmlns="urn:oasis:names:tc:SAML:2.0:assertion"&amp;gt;http://security_saml  &lt;br /&gt;7:  /goodbyeworld&amp;lt;/Audience&amp;gt;&amp;lt;/AudienceRestriction&amp;gt;&amp;lt;/Conditions&amp;gt;&amp;lt;dsig:Signature xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;&amp;lt;dsig:SignedInfo xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;  &lt;br /&gt;8:  &amp;lt;dsig:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#WithComments" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"/&amp;gt;&amp;lt;dsig:SignatureMethod  &lt;br /&gt;9:  Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"/&amp;gt;&amp;lt;dsig:Reference URI="#ID_bc96b4b9-0743-49ca-8e32-b0bd3cd80185"  &lt;br /&gt;10:  xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;&amp;lt;dsig:Transforms xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;&amp;lt;dsig:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-  &lt;br /&gt;11:  signature" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"/&amp;gt;&amp;lt;/dsig:Transforms&amp;gt;&amp;lt;dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" xmlns:dsig="http://www.w3.org/2000/09  &lt;br /&gt;12:  /xmldsig#"/&amp;gt;&amp;lt;dsig:DigestValue xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;mcisCWAF28n4AQVYf1OEzeotBFA=&amp;lt;/dsig:DigestValue&amp;gt;&amp;lt;/dsig:Reference&amp;gt;&amp;lt;/dsig:SignedInfo&amp;gt;&amp;lt;dsig:SignatureValue  &lt;br /&gt;13:  xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;GyX1b4gN/lEiu6wbdddL4uSgPu2uyPALiYgKlCvOScnEBimO62ctj0lRWMVOlNywqso9TcqFS7fb  &lt;br /&gt;14:  4fjbHif/m3S7mFfq+HhRlr3+StTtz9XWFoO/vn2twSKuwToX156RwzGlT4NvMAapmJI474uvValN  &lt;br /&gt;15:  /HcLLHpqB2GI1XwD0kg=&amp;lt;/dsig:SignatureValue&amp;gt;&amp;lt;dsig:KeyInfo xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;&amp;lt;dsig:KeyValue xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;&amp;lt;dsig:RSAKeyValue  &lt;br /&gt;16:   xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;&amp;lt;dsig:Modulus xmlns:dsig="http://www.w3.org/2000/09  &lt;br /&gt;17:  /xmldsig#"&amp;gt;suGIyhVTbFvDwZdx8Av62zmP+aGOlsBN8WUE3eEEcDtOIZgO78SImMQGwB2C0eIVMhiLRzVPqoW1  &lt;br /&gt;18:  dCPAveTm653zHOmubaps1fY0lLJDSZbTbhjeYhoQmmaBro/tDpVw5lKJns2qVnMuRK19ju2dxpKw  &lt;br /&gt;19:  lYGGtrP5VQv00dfNPbs=&amp;lt;/dsig:Modulus&amp;gt;&amp;lt;dsig:Exponent xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;AQAB&amp;lt;/dsig:Exponent&amp;gt;&amp;lt;/dsig:RSAKeyValue&amp;gt;&amp;lt;/dsig:KeyValue&amp;gt;&amp;lt;/dsig:KeyInfo&amp;gt;  &lt;br /&gt;20:  &amp;lt;/dsig:Signature&amp;gt;&amp;lt;/Assertion&amp;gt;]  &lt;br /&gt;21:  2010-09-07 20:46:46,081 DEBUG [org.jboss.internal.soa.esb.services.security.PrivateCryptoUtil] (pool-24-thread-1) SealAlgorithm 'TripleDES' keySize '168'  &lt;br /&gt;22:  2010-09-07 20:46:46,173 DEBUG [org.jboss.soa.esb.listeners.message.ActionProcessingPipeline] (pool-24-thread-1) executing processor 0  &lt;br /&gt;23:  org.jboss.soa.esb.listeners.message.OverriddenActionLifecycleProcessor@1ae20eb  &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;The issueTokenService displays the subject assert:&lt;br /&gt;&lt;br /&gt;&lt;pre style="-moz-background-clip: -moz-initial; -moz-background-inline-policy: -moz-initial; -moz-background-origin: -moz-initial; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black;"&gt;1:  2010-09-07 20:46:46,175 INFO [STDOUT] (pool-24-thread-1) Subject in MyListenerAction : Subject:  &lt;br /&gt;2:    Public Credential: SamlCredential[&amp;lt;Assertion xmlns="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:ns2="http://www.w3.org/2001/04/xmlenc#" xmlns:ns3="http://www.w3.org/2000/09/xmldsig#"  &lt;br /&gt;3:  ID="ID_bc96b4b9-0743-49ca-8e32-b0bd3cd80185" IssueInstant="2010-09-08T00:46:45.294Z" Version="2.0"&amp;gt;&amp;lt;Issuer xmlns="urn:oasis:names:tc:SAML:2.0:assertion"&amp;gt;PicketLinkSTS&amp;lt;/Issuer&amp;gt;&amp;lt;Subject  &lt;br /&gt;4:  xmlns="urn:oasis:names:tc:SAML:2.0:assertion"&amp;gt;&amp;lt;NameID NameQualifier="urn:picketlink:identity-federation" xmlns="urn:oasis:names:tc:SAML:2.0:assertion"&amp;gt;admin&amp;lt;/NameID&amp;gt;&amp;lt;SubjectConfirmation  &lt;br /&gt;5:  Method="urn:oasis:names:tc:SAML:2.0:cm:bearer" xmlns="urn:oasis:names:tc:SAML:2.0:assertion"/&amp;gt;&amp;lt;/Subject&amp;gt;&amp;lt;Conditions NotBefore="2010-09-08T00:46:45.294Z"  &lt;br /&gt;6:  NotOnOrAfter="2010-09-08T02:46:45.294Z" xmlns="urn:oasis:names:tc:SAML:2.0:assertion"&amp;gt;&amp;lt;AudienceRestriction xmlns="urn:oasis:names:tc:SAML:2.0:assertion"&amp;gt;&amp;lt;Audience  &lt;br /&gt;7:  xmlns="urn:oasis:names:tc:SAML:2.0:assertion"&amp;gt;http://security_saml/goodbyeworld&amp;lt;/Audience&amp;gt;&amp;lt;/AudienceRestriction&amp;gt;&amp;lt;/Conditions&amp;gt;&amp;lt;dsig:Signature xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;  &lt;br /&gt;8:  &amp;lt;dsig:SignedInfo xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;&amp;lt;dsig:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#WithComments" xmlns:dsig="http://www.w3.org  &lt;br /&gt;9:  /2000/09/xmldsig#"/&amp;gt;&amp;lt;dsig:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"/&amp;gt;&amp;lt;dsig:Reference URI="#ID_bc96b4b9-0743-49ca-  &lt;br /&gt;10:  8e32-b0bd3cd80185" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;&amp;lt;dsig:Transforms xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;&amp;lt;dsig:Transform Algorithm="http://www.w3.org/2000/09  &lt;br /&gt;11:  /xmldsig#enveloped-signature" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"/&amp;gt;&amp;lt;/dsig:Transforms&amp;gt;&amp;lt;dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"  &lt;br /&gt;12:  xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"/&amp;gt;&amp;lt;dsig:DigestValue xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;mcisCWAF28n4AQVYf1OEzeotBFA=&amp;lt;/dsig:DigestValue&amp;gt;&amp;lt;/dsig:Reference&amp;gt;  &lt;br /&gt;13:  &amp;lt;/dsig:SignedInfo&amp;gt;&amp;lt;dsig:SignatureValue xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;GyX1b4gN/lEiu6wbdddL4uSgPu2uyPALiYgKlCvOScnEBimO62ctj0lRWMVOlNywqso9TcqFS7fb  &lt;br /&gt;14:  4fjbHif/m3S7mFfq+HhRlr3+StTtz9XWFoO/vn2twSKuwToX156RwzGlT4NvMAapmJI474uvValN  &lt;br /&gt;15:  /HcLLHpqB2GI1XwD0kg=&amp;lt;/dsig:SignatureValue&amp;gt;&amp;lt;dsig:KeyInfo xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;&amp;lt;dsig:KeyValue xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;&amp;lt;dsig:RSAKeyValue  &lt;br /&gt;16:  xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;&amp;lt;dsig:Modulus xmlns:dsig="http://www.w3.org/2000/09  &lt;br /&gt;17:  /xmldsig#"&amp;gt;suGIyhVTbFvDwZdx8Av62zmP+aGOlsBN8WUE3eEEcDtOIZgO78SImMQGwB2C0eIVMhiLRzVPqoW1  &lt;br /&gt;18:  dCPAveTm653zHOmubaps1fY0lLJDSZbTbhjeYhoQmmaBro/tDpVw5lKJns2qVnMuRK19ju2dxpKw  &lt;br /&gt;19:  lYGGtrP5VQv00dfNPbs=&amp;lt;/dsig:Modulus&amp;gt;&amp;lt;dsig:Exponent xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;AQAB&amp;lt;/dsig:Exponent&amp;gt;&amp;lt;/dsig:RSAKeyValue&amp;gt;&amp;lt;/dsig:KeyValue&amp;gt;&amp;lt;/dsig:KeyInfo&amp;gt;  &lt;br /&gt;20:  &amp;lt;/dsig:Signature&amp;gt;&amp;lt;/Assertion&amp;gt;]  &lt;br /&gt;21:  2010-09-07 20:46:46,178 DEBUG [org.jboss.soa.esb.listeners.message.ActionProcessingPipeline] (pool-24-thread-1) executing processor 1 org.jboss.soa.esb.actions.StaticRouter@826935  &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;The message is routed to the 2nd service "securedSamlService"):&lt;br /&gt;&lt;br /&gt;&lt;pre style="-moz-background-clip: -moz-initial; -moz-background-inline-policy: -moz-initial; -moz-background-origin: -moz-initial; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black;"&gt;1:  2010-09-07 20:46:46,179 DEBUG [org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl] (pool-24-thread-1) Going to query the registry for name pattern [securedSamlService]  &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Where the assert is validated:&lt;br /&gt;&lt;br /&gt;&lt;pre style="-moz-background-clip: -moz-initial; -moz-background-inline-policy: -moz-initial; -moz-background-origin: -moz-initial; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black;"&gt;1:  2010-09-07 20:46:46,791 DEBUG [org.picketlink.identity.federation.core.wstrust.auth.STSValidatingLoginModule] (pool-25-thread-1) Validation result: true  &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;And the subject is displayed again:&lt;br /&gt;&lt;br /&gt;&lt;pre style="-moz-background-clip: -moz-initial; -moz-background-inline-policy: -moz-initial; -moz-background-origin: -moz-initial; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black;"&gt;1:  2010-09-07 20:46:46,833 INFO [STDOUT] (pool-25-thread-1) Subject in MyListenerAction : Subject:  &lt;br /&gt;2:    Public Credential: SamlCredential[&amp;lt;Assertion xmlns="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:ns2="http://www.w3.org/2001/04/xmlenc#" xmlns:ns3="http://www.w3.org/2000/09/xmldsig#"  &lt;br /&gt;3:   ID="ID_bc96b4b9-0743-49ca-8e32-b0bd3cd80185" IssueInstant="2010-09-08T00:46:45.294Z" Version="2.0"&amp;gt;&amp;lt;Issuer xmlns="urn:oasis:names:tc:SAML:2.0:assertion"&amp;gt;PicketLinkSTS&amp;lt;/Issuer&amp;gt;&amp;lt;Subject  &lt;br /&gt;4:  xmlns="urn:oasis:names:tc:SAML:2.0:assertion"&amp;gt;&amp;lt;NameID NameQualifier="urn:picketlink:identity-federation" xmlns="urn:oasis:names:tc:SAML:2.0:assertion"&amp;gt;admin&amp;lt;/NameID&amp;gt;&amp;lt;SubjectConfirmation  &lt;br /&gt;5:  Method="urn:oasis:names:tc:SAML:2.0:cm:bearer" xmlns="urn:oasis:names:tc:SAML:2.0:assertion"/&amp;gt;&amp;lt;/Subject&amp;gt;&amp;lt;Conditions NotBefore="2010-09-08T00:46:45.294Z"  &lt;br /&gt;6:  NotOnOrAfter="2010-09-08T02:46:45.294Z" xmlns="urn:oasis:names:tc:SAML:2.0:assertion"&amp;gt;&amp;lt;AudienceRestriction xmlns="urn:oasis:names:tc:SAML:2.0:assertion"&amp;gt;&amp;lt;Audience  &lt;br /&gt;7:  xmlns="urn:oasis:names:tc:SAML:2.0:assertion"&amp;gt;http://security_saml/goodbyeworld&amp;lt;/Audience&amp;gt;&amp;lt;/AudienceRestriction&amp;gt;&amp;lt;/Conditions&amp;gt;&amp;lt;dsig:Signature xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;  &lt;br /&gt;8:  &amp;lt;dsig:SignedInfo xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;&amp;lt;dsig:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#WithComments" xmlns:dsig="http://www.w3.org  &lt;br /&gt;9:  /2000/09/xmldsig#"/&amp;gt;&amp;lt;dsig:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"/&amp;gt;&amp;lt;dsig:Reference URI="#ID_bc96b4b9-0743-49ca-  &lt;br /&gt;10:  8e32-b0bd3cd80185" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;&amp;lt;dsig:Transforms xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;&amp;lt;dsig:Transform Algorithm="http://www.w3.org/2000/09  &lt;br /&gt;11:  /xmldsig#enveloped-signature" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"/&amp;gt;&amp;lt;/dsig:Transforms&amp;gt;&amp;lt;dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"  &lt;br /&gt;12:  xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"/&amp;gt;&amp;lt;dsig:DigestValue xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;mcisCWAF28n4AQVYf1OEzeotBFA=&amp;lt;/dsig:DigestValue&amp;gt;&amp;lt;/dsig:Reference&amp;gt;  &lt;br /&gt;13:  &amp;lt;/dsig:SignedInfo&amp;gt;&amp;lt;dsig:SignatureValue xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;GyX1b4gN/lEiu6wbdddL4uSgPu2uyPALiYgKlCvOScnEBimO62ctj0lRWMVOlNywqso9TcqFS7fb  &lt;br /&gt;14:  4fjbHif/m3S7mFfq+HhRlr3+StTtz9XWFoO/vn2twSKuwToX156RwzGlT4NvMAapmJI474uvValN  &lt;br /&gt;15:  /HcLLHpqB2GI1XwD0kg=&amp;lt;/dsig:SignatureValue&amp;gt;&amp;lt;dsig:KeyInfo xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;&amp;lt;dsig:KeyValue xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;&amp;lt;dsig:RSAKeyValue  &lt;br /&gt;16:  xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;&amp;lt;dsig:Modulus xmlns:dsig="http://www.w3.org/2000/09  &lt;br /&gt;17:  /xmldsig#"&amp;gt;suGIyhVTbFvDwZdx8Av62zmP+aGOlsBN8WUE3eEEcDtOIZgO78SImMQGwB2C0eIVMhiLRzVPqoW1  &lt;br /&gt;18:  dCPAveTm653zHOmubaps1fY0lLJDSZbTbhjeYhoQmmaBro/tDpVw5lKJns2qVnMuRK19ju2dxpKw  &lt;br /&gt;19:  lYGGtrP5VQv00dfNPbs=&amp;lt;/dsig:Modulus&amp;gt;&amp;lt;dsig:Exponent xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;AQAB&amp;lt;/dsig:Exponent&amp;gt;&amp;lt;/dsig:RSAKeyValue&amp;gt;&amp;lt;/dsig:KeyValue&amp;gt;&amp;lt;/dsig:KeyInfo&amp;gt;  &lt;br /&gt;20:  &amp;lt;/dsig:Signature&amp;gt;&amp;lt;/Assertion&amp;gt;]  &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;And the message is routed to the sendExternal service:&lt;br /&gt;&lt;br /&gt;&lt;pre style="-moz-background-clip: -moz-initial; -moz-background-inline-policy: -moz-initial; -moz-background-origin: -moz-initial; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black;"&gt;1:  2010-09-07 20:46:46,833 DEBUG [org.jboss.soa.esb.listeners.message.ActionProcessingPipeline] (pool-25-thread-1) executing processor 1 org.jboss.soa.esb.actions.StaticRouter@1596c3a  &lt;br /&gt;2:  2010-09-07 20:46:46,834 DEBUG [org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl] (pool-25-thread-1) Going to query the registry for name pattern [sendExternal]  &lt;br /&gt;3:  2010-09-07 20:46:47,391 DEBUG [org.picketlink.identity.federation.core.wstrust.auth.AbstractSTSLoginModule] (pool-26-thread-1) Added Credential :SamlCredential[&amp;lt;Assertion  &lt;br /&gt;4:  xmlns="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:ns2="http://www.w3.org/2001/04/xmlenc#" xmlns:ns3="http://www.w3.org/2000/09/xmldsig#" ID="ID_bc96b4b9-0743-49ca-8e32-b0bd3cd80185"  &lt;br /&gt;5:  IssueInstant="2010-09-08T00:46:45.294Z" Version="2.0"&amp;gt;&amp;lt;Issuer xmlns="urn:oasis:names:tc:SAML:2.0:assertion"&amp;gt;PicketLinkSTS&amp;lt;/Issuer&amp;gt;&amp;lt;Subject xmlns="urn:oasis:names:tc:SAML:2.0:assertion"&amp;gt;&amp;lt;NameID  &lt;br /&gt;6:   NameQualifier="urn:picketlink:identity-federation" xmlns="urn:oasis:names:tc:SAML:2.0:assertion"&amp;gt;admin&amp;lt;/NameID&amp;gt;&amp;lt;SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer"  &lt;br /&gt;7:  xmlns="urn:oasis:names:tc:SAML:2.0:assertion"/&amp;gt;&amp;lt;/Subject&amp;gt;&amp;lt;Conditions NotBefore="2010-09-08T00:46:45.294Z" NotOnOrAfter="2010-09-08T02:46:45.294Z"  &lt;br /&gt;8:  xmlns="urn:oasis:names:tc:SAML:2.0:assertion"&amp;gt;&amp;lt;AudienceRestriction xmlns="urn:oasis:names:tc:SAML:2.0:assertion"&amp;gt;&amp;lt;Audience xmlns="urn:oasis:names:tc:SAML:2.0:assertion"&amp;gt;http://security_saml  &lt;br /&gt;9:  /goodbyeworld&amp;lt;/Audience&amp;gt;&amp;lt;/AudienceRestriction&amp;gt;&amp;lt;/Conditions&amp;gt;&amp;lt;dsig:Signature xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;&amp;lt;dsig:SignedInfo xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;  &lt;br /&gt;10:  &amp;lt;dsig:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#WithComments" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"/&amp;gt;&amp;lt;dsig:SignatureMethod  &lt;br /&gt;11:  Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"/&amp;gt;&amp;lt;dsig:Reference URI="#ID_bc96b4b9-0743-49ca-8e32-b0bd3cd80185"  &lt;br /&gt;12:  xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;&amp;lt;dsig:Transforms xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;&amp;lt;dsig:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-  &lt;br /&gt;13:  signature" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"/&amp;gt;&amp;lt;/dsig:Transforms&amp;gt;&amp;lt;dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" xmlns:dsig="http://www.w3.org/2000/09  &lt;br /&gt;14:  /xmldsig#"/&amp;gt;&amp;lt;dsig:DigestValue xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;mcisCWAF28n4AQVYf1OEzeotBFA=&amp;lt;/dsig:DigestValue&amp;gt;&amp;lt;/dsig:Reference&amp;gt;&amp;lt;/dsig:SignedInfo&amp;gt;&amp;lt;dsig:SignatureValue  &lt;br /&gt;15:  xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;GyX1b4gN/lEiu6wbdddL4uSgPu2uyPALiYgKlCvOScnEBimO62ctj0lRWMVOlNywqso9TcqFS7fb  &lt;br /&gt;16:  4fjbHif/m3S7mFfq+HhRlr3+StTtz9XWFoO/vn2twSKuwToX156RwzGlT4NvMAapmJI474uvValN  &lt;br /&gt;17:  /HcLLHpqB2GI1XwD0kg=&amp;lt;/dsig:SignatureValue&amp;gt;&amp;lt;dsig:KeyInfo xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;&amp;lt;dsig:KeyValue xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;&amp;lt;dsig:RSAKeyValue  &lt;br /&gt;18:  xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;&amp;lt;dsig:Modulus xmlns:dsig="http://www.w3.org/2000/09  &lt;br /&gt;19:  /xmldsig#"&amp;gt;suGIyhVTbFvDwZdx8Av62zmP+aGOlsBN8WUE3eEEcDtOIZgO78SImMQGwB2C0eIVMhiLRzVPqoW1  &lt;br /&gt;20:  dCPAveTm653zHOmubaps1fY0lLJDSZbTbhjeYhoQmmaBro/tDpVw5lKJns2qVnMuRK19ju2dxpKw  &lt;br /&gt;21:  lYGGtrP5VQv00dfNPbs=&amp;lt;/dsig:Modulus&amp;gt;&amp;lt;dsig:Exponent xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;AQAB&amp;lt;/dsig:Exponent&amp;gt;&amp;lt;/dsig:RSAKeyValue&amp;gt;&amp;lt;/dsig:KeyValue&amp;gt;&amp;lt;/dsig:KeyInfo&amp;gt;  &lt;br /&gt;22:  &amp;lt;/dsig:Signature&amp;gt;&amp;lt;/Assertion&amp;gt;]  &lt;br /&gt;23:  2010-09-07 20:46:47,392 DEBUG [org.jboss.soa.esb.listeners.message.ActionProcessingPipeline] (pool-26-thread-1) executing processor 0  &lt;br /&gt;24:  org.jboss.soa.esb.listeners.message.OverriddenActionLifecycleProcessor@1ac4773  &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;The subject is displayed a final time:&lt;br /&gt;&lt;br /&gt;&lt;pre style="-moz-background-clip: -moz-initial; -moz-background-inline-policy: -moz-initial; -moz-background-origin: -moz-initial; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black;"&gt;1:  2010-09-07 20:46:47,392 INFO [STDOUT] (pool-26-thread-1) Subject in MyListenerAction : Subject:  &lt;br /&gt;2:    Public Credential: SamlCredential[&amp;lt;Assertion xmlns="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:ns2="http://www.w3.org/2001/04/xmlenc#" xmlns:ns3="http://www.w3.org/2000/09/xmldsig#"  &lt;br /&gt;3:  ID="ID_bc96b4b9-0743-49ca-8e32-b0bd3cd80185" IssueInstant="2010-09-08T00:46:45.294Z" Version="2.0"&amp;gt;&amp;lt;Issuer xmlns="urn:oasis:names:tc:SAML:2.0:assertion"&amp;gt;PicketLinkSTS&amp;lt;/Issuer&amp;gt;&amp;lt;Subject  &lt;br /&gt;4:  xmlns="urn:oasis:names:tc:SAML:2.0:assertion"&amp;gt;&amp;lt;NameID NameQualifier="urn:picketlink:identity-federation" xmlns="urn:oasis:names:tc:SAML:2.0:assertion"&amp;gt;admin&amp;lt;/NameID&amp;gt;&amp;lt;SubjectConfirmation  &lt;br /&gt;5:  Method="urn:oasis:names:tc:SAML:2.0:cm:bearer" xmlns="urn:oasis:names:tc:SAML:2.0:assertion"/&amp;gt;&amp;lt;/Subject&amp;gt;&amp;lt;Conditions NotBefore="2010-09-08T00:46:45.294Z"  &lt;br /&gt;6:  NotOnOrAfter="2010-09-08T02:46:45.294Z" xmlns="urn:oasis:names:tc:SAML:2.0:assertion"&amp;gt;&amp;lt;AudienceRestriction xmlns="urn:oasis:names:tc:SAML:2.0:assertion"&amp;gt;&amp;lt;Audience  &lt;br /&gt;7:  xmlns="urn:oasis:names:tc:SAML:2.0:assertion"&amp;gt;http://security_saml/goodbyeworld&amp;lt;/Audience&amp;gt;&amp;lt;/AudienceRestriction&amp;gt;&amp;lt;/Conditions&amp;gt;&amp;lt;dsig:Signature xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;  &lt;br /&gt;8:  &amp;lt;dsig:SignedInfo xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;&amp;lt;dsig:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#WithComments" xmlns:dsig="http://www.w3.org  &lt;br /&gt;9:  /2000/09/xmldsig#"/&amp;gt;&amp;lt;dsig:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"/&amp;gt;&amp;lt;dsig:Reference URI="#ID_bc96b4b9-0743-49ca-  &lt;br /&gt;10:  8e32-b0bd3cd80185" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;&amp;lt;dsig:Transforms xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;&amp;lt;dsig:Transform Algorithm="http://www.w3.org/2000/09  &lt;br /&gt;11:  /xmldsig#enveloped-signature" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"/&amp;gt;&amp;lt;/dsig:Transforms&amp;gt;&amp;lt;dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"  &lt;br /&gt;12:  xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"/&amp;gt;&amp;lt;dsig:DigestValue xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;mcisCWAF28n4AQVYf1OEzeotBFA=&amp;lt;/dsig:DigestValue&amp;gt;&amp;lt;/dsig:Reference&amp;gt;  &lt;br /&gt;13:  &amp;lt;/dsig:SignedInfo&amp;gt;&amp;lt;dsig:SignatureValue xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;GyX1b4gN/lEiu6wbdddL4uSgPu2uyPALiYgKlCvOScnEBimO62ctj0lRWMVOlNywqso9TcqFS7fb  &lt;br /&gt;14:  4fjbHif/m3S7mFfq+HhRlr3+StTtz9XWFoO/vn2twSKuwToX156RwzGlT4NvMAapmJI474uvValN  &lt;br /&gt;15:  /HcLLHpqB2GI1XwD0kg=&amp;lt;/dsig:SignatureValue&amp;gt;&amp;lt;dsig:KeyInfo xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;&amp;lt;dsig:KeyValue xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;&amp;lt;dsig:RSAKeyValue  &lt;br /&gt;16:   xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;&amp;lt;dsig:Modulus xmlns:dsig="http://www.w3.org/2000/09  &lt;br /&gt;17:  /xmldsig#"&amp;gt;suGIyhVTbFvDwZdx8Av62zmP+aGOlsBN8WUE3eEEcDtOIZgO78SImMQGwB2C0eIVMhiLRzVPqoW1  &lt;br /&gt;18:  dCPAveTm653zHOmubaps1fY0lLJDSZbTbhjeYhoQmmaBro/tDpVw5lKJns2qVnMuRK19ju2dxpKw  &lt;br /&gt;19:  lYGGtrP5VQv00dfNPbs=&amp;lt;/dsig:Modulus&amp;gt;&amp;lt;dsig:Exponent xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"&amp;gt;AQAB&amp;lt;/dsig:Exponent&amp;gt;&amp;lt;/dsig:RSAKeyValue&amp;gt;&amp;lt;/dsig:KeyValue&amp;gt;&amp;lt;/dsig:KeyInfo&amp;gt;&amp;lt;/dsig:Signature&amp;gt;&amp;lt;/Assertion&amp;gt;]  &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Smooks inserts the assert into the message:&lt;br /&gt;&lt;br /&gt;&lt;pre style="-moz-background-clip: -moz-initial; -moz-background-inline-policy: -moz-initial; -moz-background-origin: -moz-initial; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black;"&gt;1:  2010-09-07 20:46:47,916 DEBUG [org.milyn.util.ClassUtil] (pool-26-thread-1) Adding org.milyn.javabean.decoders.BigDecimalDecoder to list of classes  &lt;br /&gt;2:  2010-09-07 20:46:47,917 DEBUG [org.milyn.util.ClassUtil] (pool-26-thread-1) Adding org.milyn.javabean.decoders.BigIntegerDecoder to list of classes  &lt;br /&gt;3:  2010-09-07 20:46:47,918 DEBUG [org.milyn.util.ClassUtil] (pool-26-thread-1) Adding org.milyn.javabean.decoders.BooleanDecoder to list of classes  &lt;br /&gt;4:  (lots more lines like this)  &lt;br /&gt;5:    &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;And the web service is accessed:&lt;br /&gt;&lt;br /&gt;&lt;pre style="-moz-background-clip: -moz-initial; -moz-background-inline-policy: -moz-initial; -moz-background-origin: -moz-initial; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black;"&gt;1:  2010-09-07 20:46:48,415 DEBUG [org.jboss.ws.core.EndpointInvocation] (pool-26-thread-1) transformPayloadValue: org.jboss.ws.core.soap.SOAPBodyElementDoc -&amp;gt; org.jboss.soa.esb.samples.quickstart.securitysaml.webservice.jaxws.SayGoodbye  &lt;br /&gt;2:    &amp;lt;/soapenv:Header&amp;gt;  &lt;br /&gt;3:    &amp;lt;soapenv:Body&amp;gt;  &lt;br /&gt;4:     &amp;lt;good:sayGoodbye&amp;gt;  &lt;br /&gt;5:       &amp;lt;message&amp;gt;Goodbye!!&amp;lt;/message&amp;gt;  &lt;br /&gt;6:     &amp;lt;/good:sayGoodbye&amp;gt;  &lt;br /&gt;7:    &amp;lt;/soapenv:Body&amp;gt;  &lt;br /&gt;8:  &amp;lt;/soapenv:Envelope&amp;gt;  &lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;Closing Thoughts&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;OK, let's review what happened. &lt;br /&gt;&lt;br /&gt;The quickstart demonstrate these (4) procedures:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Using the PicketLink Project's STSIssuingLoginModule to issue a SAML Assertion from PicketLinkSTS, then&lt;/li&gt;&lt;li&gt;Using the PicketLink Project's STSValidatingLoginModule to validate a SAML Assertion from PicketLinkSTS, then&lt;/li&gt;&lt;li&gt;Injecting the SAML Assertion into a SOAP Message, then&lt;/li&gt;&lt;li&gt;Using SOAPProcessor to invoke an external Web Service that is secured by PicketLinkSTS.&lt;/li&gt;&lt;/ol&gt;And, notice what the quickstart did not have to do - it did not have to include a large amount of custom-written code to issue or validate the SAML Assertion. PicketLinkSTS and the JBossESB in the SOA Platform did the heavy lifting.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Acknowledgements&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;As always, I want to thank the JBoss SOA Platform team and community (especially Anil Saldhana, Babak Mozaffari, and Kevin Conner for their timely review input for this blog post).&lt;br /&gt;&lt;br /&gt;&lt;b&gt;References&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Organization for the Advancement of Structured Information Standards (OASIS - &lt;a href="http://www.oasis-open.org/"&gt;http://www.oasis-open.org&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;PicketLink (&lt;a href="http://jboss.org/picketlink"&gt;http://jboss.org/picketlink&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;PicketBox (&lt;a href="http://www.jboss.org/picketbox"&gt;http://www.jboss.org/picketbox&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;SAML Token support for ESB services. (&lt;a href="http://community.jboss.org/wiki/JBossESBSAMLSupport"&gt;http://community.jboss.org/wiki/JBossESBSAMLSupport&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;PicketLink Login Modules (&lt;a href="https://community.jboss.org/wiki/PicketLinkSTSLoginModules"&gt;https://community.jboss.org/wiki/PicketLinkSTSLoginModules&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;Web Service Security (&lt;a href="http://docs.sun.com/source/819-0788/xwss2.html"&gt;http://docs.sun.com/source/819-0788/xwss2.html&lt;/a&gt;, &lt;a href="http://community.jboss.org/wiki/WSSecurityConfig"&gt;http://community.jboss.org/wiki/WSSecurityConfig&lt;/a&gt;, &lt;a href="http://community.jboss.org/wiki/jbossws-ws-securityoptions"&gt;http://community.jboss.org/wiki/jbossws-ws-securityoptions&lt;/a&gt;&lt;/li&gt;&lt;li&gt;JSR 181 ("Web Services Metadata for the Java Platform") (&lt;a href="http://jcp.org/en/jsr/detail?id=181"&gt;http://jcp.org/en/jsr/detail?id=181&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;&lt;a href="http://docs.redhat.com/docs/en-US/JBoss_Enterprise_SOA_Platform/5/html/ESB_Programmers_Guide/index.html"&gt;http://docs.redhat.com/docs/en-US/JBoss_Enterprise_SOA_Platform/5/html/ESB_Programmers_Guide/index.html&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9094589327053503491-338307079561583726?l=jboss-soa-p.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jboss-soa-p.blogspot.com/feeds/338307079561583726/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9094589327053503491&amp;postID=338307079561583726' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/338307079561583726'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/338307079561583726'/><link rel='alternate' type='text/html' href='http://jboss-soa-p.blogspot.com/2010/09/asserting-security-jbossesb-integration.html' title='Asserting Security - The JBossESB Integration with SAML in the JBoss SOA Platform'/><author><name>Len DiMaggio</name><uri>http://www.blogger.com/profile/07124585546929851174</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='20' src='http://1.bp.blogspot.com/_Wad47xG7w3A/Sc7b75epEEI/AAAAAAAAAQ4/F9-h0znUI7w/S220/Boston.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_Wad47xG7w3A/TJgUQwqO3vI/AAAAAAAACrY/eKjw6Y4kOiU/s72-c/SAMLdiagram.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9094589327053503491.post-6837319278663989948</id><published>2010-08-17T12:20:00.000-07:00</published><updated>2010-08-17T12:20:33.691-07:00</updated><title type='text'>Reposted in DZone</title><content type='html'>The post describing the JBossESB / Drools integration in the SOA Platform was just posted up on DZone:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://java.dzone.com/articles/jbossesb-drools-integration"&gt;http://java.dzone.com/articles/jbossesb-drools-integration&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9094589327053503491-6837319278663989948?l=jboss-soa-p.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jboss-soa-p.blogspot.com/feeds/6837319278663989948/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9094589327053503491&amp;postID=6837319278663989948' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/6837319278663989948'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/6837319278663989948'/><link rel='alternate' type='text/html' href='http://jboss-soa-p.blogspot.com/2010/08/reposted-in-dzone.html' title='Reposted in DZone'/><author><name>Len DiMaggio</name><uri>http://www.blogger.com/profile/07124585546929851174</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='20' src='http://1.bp.blogspot.com/_Wad47xG7w3A/Sc7b75epEEI/AAAAAAAAAQ4/F9-h0znUI7w/S220/Boston.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9094589327053503491.post-2814277740108983110</id><published>2010-07-08T08:13:00.000-07:00</published><updated>2010-07-08T08:14:25.874-07:00</updated><title type='text'>The JBossESB-Drools Integration in the JBoss SOA Platform</title><content type='html'>As I've mentioned in previous posts and articles, one of the great strengths of the JBoss SOA Platform is the large number of integrations that it supports. Some of these integrations take the form of support for JBoss and third-party supplied JMS and UDDI providers or support for multiple JDKs and databases. The SOA Platform also supports an integration to jBPM for business process orchestration, and JBDS for application development.&lt;br /&gt;&lt;br /&gt;In this post, I want to take a look at the SOA Platform's integration with JBoss Rules. In an earlier blog post (&lt;a href="http://jboss-soa-p.blogspot.com/2009/07/when-content-knows-way-content-based.html" id="v0ka" title="http://jboss-soa-p.blogspot.com/2009/07/when-content-knows-way-content-based.html"&gt;http://jboss-soa-p.blogspot.com/2009/07/when-content-knows-way-content-based.html)&lt;/a&gt;, I discussed using Rules to implement content based routing over the JBossESB. In this post, we'll look at another aspect of the JBossESB-Rules integration; the creation of rules-based services. &lt;br /&gt;&lt;br /&gt;Before we examine this integration in detail, let's take a quick look at JBoss Rules.&lt;b "&gt;&lt;br /&gt;&lt;br /&gt;Drools and Rules &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;JBoss Rules as packaged in the SOA Platform is the commercialized version of the open source "Drools" project. (You can learn more about Drools at the project web site here: &lt;a href="http://www.jboss.org/drools/" id="u7p6" title="http://www.jboss.org/drools/"&gt;http://www.jboss.org/drools/&lt;/a&gt;)  Drools is a unified and integrated solution for Business Rules, Business Processes Management, and Event Processing. The Drools project is organized into a number of sub-projects. When we refer to JBoss Rules in the SOA Platform, what we're primarily talking about is the Drools "Expert" sub-project. This sub-project consists of the Rules API, the Rules engine, and Rules editing and debugging tools.&lt;br /&gt;&lt;br /&gt;Rules-based programming, as its name implies, is built on the ability to define decision points and keep them separate from other program logic. OK, that sounds interesting, but why would I want to use this? In other words, what's the big deal? Here are two reasons why this is important: &lt;ul  &gt;&lt;li&gt;First, it enables you to separate your application's business logic and decision point handling from the application code. This means that your business process specialists can concentrate on the business logic rules and your programmers can concentrate on the application code. This makes application development and maintenance easier and more effective.&lt;/li&gt;&lt;li&gt;Second, and don't take this as a personal criticism of your programming skills or mine, but the since the rules engine is designed and optimized to process rules, it is more efficient than any massive if-then-else statement that you can write. So, your application's performance can be improved. The JBoss Rules engine makes use of the Rete algorithm &lt;a href="http://en.wikipedia.org/wiki/Rete_algorithm" id="uw2g" title="http://en.wikipedia.org/wiki/Rete_algorithm"&gt;http://en.wikipedia.org/wiki/Rete_algorithm&lt;/a&gt; for efficient Rules processing.&lt;/li&gt;&lt;/ul&gt;When you define a rule, the model that you follow is not "if-then-else," but rather "when" and "then." The two constructs that you use in a rule are: &lt;ul&gt;&lt;li&gt;The Condition - This is the left hand side of the rule and covers the "when" aspects of the rule.&lt;/li&gt;&lt;li&gt;The Consequence - This is the right hand side of the rule and covers the "then" aspects of the rule.&lt;/li&gt;&lt;/ul&gt;Rules are written in the Drools Rule Language (drl). This language can be extended into a Domain Specific Language (dsl) to support application-specific requirements such as medical or financial procedures and terminology.&lt;br /&gt;&lt;br /&gt;The general template for a rule is:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;1:  rule “a simple rule”&lt;br /&gt;2:  when (LHS)&lt;br /&gt;3:    you need a rules-based app&lt;br /&gt;4:  then (RHS)&lt;br /&gt;5:    build it with JBoss Rules&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;How does a rule access information? Through Rules' working memory. The information that rules perform operations take the form of Java beans that are referred to as "facts." (The elements in these facts are accessed through the getter and setter methods.) What happens is that facts are inserted into working memory, updated in working memory, or removed from working memory, those changes to the facts in working memory can cause the Rules' "when" conditions to be true and the rules to be executed.&lt;br /&gt;&lt;br /&gt;It's important to note that unlike procedural programming, changes to facts can cause more than one rule to reach true conclusions and be available to be executed at once. What happens then? Well, instead of hardcoding a sequence of rules, the rules engine adds each matching rule to its "Agenda" of rules to be executed. If the Agenda includes more than one rule, the rule engine performs conflict resolution on the rules and determines the sequence in which the rules should be executed. This conflict resolution is based on the rules' salience (you define this as a property when you write the rules), how often the rule has fired in the past, complexity (the more complex a rule the more likely the rule engine will consider it to apply to the current situation), and the order in which the rules are loaded.&lt;br /&gt;&lt;br /&gt;&lt;b "&gt;Invoking Rules from a JBossESB Service in the SOA Platform&lt;/b&gt;  &lt;br /&gt;&lt;br /&gt;The Rules - JBossESB integration in the SOA Platform enables you to access rules from an service's actions. This is supported by the org.jboss.soa.esb.actions.BusinessRuleProcessor and the org.jboss.soa.esb.actions.DroolsRuleService action classes.&lt;br /&gt;&lt;br /&gt;The BusinessRuleProcessor class uses rules loaded from rules files. Generally, you use this class for simple rules services as loading large numbers of rules from large numbers of rules files is difficult to manage and not efficient.  &lt;br /&gt;&lt;br /&gt;For production environments, where you will have complicated rules services that deal with hundreds or even thousands of rules, it's better to use the DroolsRuleService. This service uses the RuleAgent to either access packages of rules from files, or from a Business Rules Management System (BRMS) .&lt;br /&gt;&lt;br /&gt;The JBoss BRMS Platform (&lt;a href="http://www.jboss.com/products/platforms/brms/" id="b3c3" title="http://www.jboss.com/products/platforms/brms/"&gt;http://www.jboss.com/products/platforms/brms/&lt;/a&gt;) combines a central repository for rules, with a web based rules authoring interface, and rules management that provides import/export/archiving, audit trail or edits, error log, automated test development and execution, rules analysis, status tracking, and version control. The BRMS Platform rules authoring "guided editor" enables non-programmers to more easily create rules while the Platform makes it easy for rules administrartors can maintain large numbers of rules and control their development and use by users. Here's a screenshot:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_Wad47xG7w3A/TCFsEhzhIDI/AAAAAAAABfI/IYlvQT84jkY/s1600/brms.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 196px;" src="http://3.bp.blogspot.com/_Wad47xG7w3A/TCFsEhzhIDI/AAAAAAAABfI/IYlvQT84jkY/s400/brms.jpg" alt="" id="BLOGGER_PHOTO_ID_5485784646163701810" border="0" /&gt;&lt;/a&gt;The SOA Platform supports rules services that are either stateless or stateful. In the stateless model, messages sent to the services contain all the facts to be inserted into the rules engine working memory, before the rules are executed. In the stateful model, where the execution of the rules may take place in a session over an extended time period, several messages may be sent to a rule service, and the rules may fire and update either the message or the facts until a final message causes the service to end the session.  The best way to explain and illustrate the Rules - JBossESB integration in the SOA Platform is with one of the Platform's "quickstart" example programs. Let's take a look.&lt;br /&gt;&lt;br /&gt;&lt;b "&gt;Rules Services in Action - The Quickstart&lt;/b&gt;  &lt;br /&gt;&lt;br /&gt;I never get tired of saying that one of the great features of the SOA Platform is its extensive, and always growing, set of "quickstart" programs. These programs go far beyond being simple examples as they clearly illustrate various features supported by the Platform. They also serve as a great resource for writing your own applications. For our example, we'll look at the "business_rules_service" quickstart.   Before we walk through the configuration and execution of the quickstart, let's take a look at its (3) Rules files. It important to note that Rules are actually used in multiple ways in this quickstart as it simulates a customer making a purchase from an e-commerce site. The quickstart uses Rules to:  &lt;ul&gt;&lt;li&gt;Calculate the priority of an incoming customer order&lt;/li&gt;&lt;li&gt;Calculate the discount to be applied to an order&lt;/li&gt;&lt;li&gt;And route the order to the appropriate service, based on the content of the order&lt;/li&gt;&lt;/ul&gt; It's also important to note that the quickstart illustrates how a message can be modified as it is processed through the SOA Platform's JBossESB action pipeline.  Let's start with the "MyBusinessRules.drl" file, as it establishes the priority of the order. (Oh, wait. We'll jump ahead a bit here and explain that by default, every incoming order has a priority value of "1.")&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;1:  package com.jboss.soa.esb.routing.cbr&lt;br /&gt;2:&lt;br /&gt;3:  #list any import classes here.&lt;br /&gt;4:  import org.jboss.soa.esb.message.Message;&lt;br /&gt;5:  import org.jboss.soa.esb.message.format.MessageType;&lt;br /&gt;6:  import org.jboss.soa.esb.samples.quickstart.businessrules.dvdstore.OrderHeader;&lt;br /&gt;7:  import org.jboss.soa.esb.samples.quickstart.businessrules.dvdstore.Customer;&lt;br /&gt;8:&lt;br /&gt;9:   global java.util.List destinations;&lt;br /&gt;10:&lt;br /&gt;11:&lt;br /&gt;12:&lt;br /&gt;13:   rule "Logging"&lt;br /&gt;14:   when&lt;br /&gt;15:     order: OrderHeader()&lt;br /&gt;16:     customer: Customer()&lt;br /&gt;17:   then&lt;br /&gt;18:     System.out.println("Customer Status: " + customer.getStatus());&lt;br /&gt;19:     System.out.println("Order Total: " + order.getTotalAmount());&lt;br /&gt;20:   end&lt;br /&gt;21:&lt;br /&gt;22:   rule "Customer Platinum Status"&lt;br /&gt;23:    when&lt;br /&gt;24:     customer: Customer(status &amp;gt; 50)&lt;br /&gt;25:     order: OrderHeader(totalAmount &amp;gt; 50)&lt;br /&gt;26:    then&lt;br /&gt;27:     System.out.println("Platinum Customer - High Priority");&lt;br /&gt;28:     order.setOrderPriority(3);&lt;br /&gt;29:   end&lt;br /&gt;30:&lt;br /&gt;31:   rule "Customer Gold Status"&lt;br /&gt;32:    when&lt;br /&gt;33:     customer: Customer(status &amp;gt; 10, status &amp;lt;= 50)&lt;br /&gt;34:     order: OrderHeader(totalAmount &amp;gt; 25)&lt;br /&gt;35:    then&lt;br /&gt;36:     System.out.println("Gold Customer - Medium Priority ");&lt;br /&gt;37:     order.setOrderPriority(2);&lt;br /&gt;38:   end&lt;br /&gt;39:&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;jms-bus busid="quickstartGwChannel"&gt;&lt;jms-bus busid="quickstartEsbChannel"&gt;&lt;service category="Business_RulesServices" 2="" name="Business_Rules_Service" description="The main entry point"&gt;&lt;listeners&gt;&lt;actions mep="OneWay"&gt;&lt;target name="runtest" depends="compile" description="willl receive JMS message to tigger the actions in the ESB"&gt;&lt;java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.businessrules.test.SendJMSMessage" failonerror="true"&gt;&lt;order orderid="1" orderdate="Wed Nov 15 13:45:28 EST 2006" statuscode="0" netamount="59.97" totalamount="64.92" tax="4.95"&gt;&lt;customer username="user1" firstname="Harry" lastname="Fletcher" state="SD"&gt;&lt;orderlines&gt;&lt;action name="transform" class="org.jboss.soa.esb.smooks.SmooksAction"&gt;&lt;property name="smooksConfig" value="/smooks-res.xml"&gt;&lt;smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd" jb="http://www.milyn.org/xsd/smooks/javabean-1.2.xsd"&gt;&lt;jb:bean beanid="orderHeader" class="org.jboss.soa.esb.samples.quickstart.businessrules.dvdstore.OrderHeader" createonelement="order"&gt;&lt;jb:value property="orderId" data="Order/@orderId"&gt;&lt;jb:value property="statusCode" data="Order/@statusCode"&gt;&lt;jb:value property="netAmount" data="Order/@netAmount"&gt;&lt;jb:value property="totalAmount" data="Order/@totalAmount"&gt;&lt;jb:bean beanid="customer" class="org.jboss.soa.esb.samples.quickstart.businessrules.dvdstore.Customer" createonelement="customer"&gt;&lt;jb:value property="userName" data="customer/@userName"&gt;&lt;jb:value property="firstName" data="customer/@firstName"&gt;&lt;jb:value property="lastName" data="customer/@lastName"&gt;&lt;jb:bean beanid="orderItemList" class="java.util.ArrayList" createonelement="orderlines"&gt;&lt;jb:bean beanid="orderItem" class="org.jboss.soa.esb.samples.quickstart.businessrules.dvdstore.OrderItem" createonelement="orderlines/orderline"&gt;&lt;jb:value property="position" data="orderline/@position"&gt;&lt;jb:value property="quantity" data="orderline/@quantity"&gt;&lt;jb:value property="productId" data="orderline/product/@productId"&gt;&lt;action name="map_order_components" class="org.jboss.soa.esb.actions.scripting.GroovyActionProcessor"&gt;&lt;action name="updateCustomerStatus" class="org.jboss.soa.esb.samples.quickstart.businessrules.UpdateCustomerStatus"&gt;&lt;action 3="" class="org.jboss.soa.esb.actions.BusinessRulesProcessor" 4="" name="BRP"&gt;&lt;property name="ruleSet" 6="" value="MyBusinessRules.drl"&gt;&lt;property name="ruleReload" value="true"&gt;&lt;property name="object-paths"&gt;&lt;action name="reviewMessage1" 15="" class="org.jboss.soa.esb.samples.quickstart.businessrules.ReviewMessage"&gt;&lt;action 3="" class="org.jboss.soa.esb.actions.BusinessRulesProcessor" 4="" name="BRP2"&gt;&lt;property name="ruleSet" 6="" value="MyBusinessRulesDiscount.drl"&gt;&lt;property name="ruleReload" value="true"&gt;&lt;property name="object-paths"&gt;&lt;action name="reviewMessage2" 15="" class="org.jboss.soa.esb.samples.quickstart.businessrules.ReviewMessage"&gt;&lt;action name="sout" class="org.jboss.soa.esb.actions.SystemPrintln"&gt;&lt;action 3="" class="org.jboss.soa.esb.actions.ContentBasedRouter" 4="" name="ContentBasedRouter"&gt;&lt;property name="ruleSet" value="MyRoutingRules.drl"&gt;&lt;property name="ruleReload" value="true"&gt;&lt;property name="destinations"&gt;&lt;route-to 9="" 10="" category="ConciergeManager" name="SuperSpecialCustomerService"&gt;&lt;route-to 12="" 13="" category="DistributionManager" name="SpecialCustomerService"&gt;&lt;property name="object-paths"&gt;&lt;/property&gt;&lt;/route-to&gt;&lt;/route-to&gt;&lt;/property&gt;&lt;/property&gt;&lt;/property&gt;&lt;/action&gt;&lt;/action&gt;&lt;/action&gt;&lt;/property&gt;&lt;/property&gt;&lt;/property&gt;&lt;/action&gt;&lt;/action&gt;&lt;/property&gt;&lt;/property&gt;&lt;/property&gt;&lt;/action&gt;&lt;/action&gt;&lt;/action&gt;&lt;/jb:value&gt;&lt;/jb:value&gt;&lt;/jb:value&gt;&lt;/jb:bean&gt;&lt;/jb:bean&gt;&lt;/jb:value&gt;&lt;/jb:value&gt;&lt;/jb:value&gt;&lt;/jb:bean&gt;&lt;/jb:value&gt;&lt;/jb:value&gt;&lt;/jb:value&gt;&lt;/jb:value&gt;&lt;/jb:bean&gt;&lt;/smooks-resource-list&gt;&lt;/property&gt;&lt;/action&gt;&lt;/orderlines&gt;&lt;/customer&gt;&lt;/order&gt;&lt;/java&gt;&lt;/target&gt;&lt;/actions&gt;&lt;/listeners&gt;&lt;/service&gt;&lt;/jms-bus&gt;&lt;/jms-bus&gt;Let's examine this Rules file line-by-line:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Line 1 - Similar to Java, a package is a related set of rules.&lt;/li&gt;&lt;li&gt;Lines 4-7 - These imports perform the same function as Java language imports. Note that we're importing both SOA Platform Message related packages and packages contained in the quickstart itself.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Line 9 - Make a mental note of this global definition as it will be used by the other Rules files and by the quickstart for content based routing.&lt;/li&gt;&lt;li&gt;Line 13-14 - The name for the first Rule and the start of its "when" clause.&lt;/li&gt;&lt;li&gt;Line 15 - This creates a Rule variable named "order" and initializes with the value of the OrderHeader fact (org.jboss.soa.esb.samples.quickstart.businessrules.dvdstore.OrderHeader) that is presented to the Rule.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Line 16 does the same for a Rule variable named customer and the Customer fact. Note that there is nothing conditional about these assignments. The rule will match every OrderHeader and Customer. This matching is actually an important concept to keep in mind as part of each "when" clause involves trying to match the facts passed to the rules.&lt;/li&gt;&lt;li&gt;Line 20 - A rule must always have an end statement.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Line 22 - This rule sets the status for the highest priority ("Platinum") customers. &lt;/li&gt;&lt;li&gt;Line 24-25 - Note the differences in these statements to those in lines 15 and 16. The rule will only be executed if:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Line 24 - The customer's status is greater that 50. If this is not the case, then the customer variable we set in line 16 will not be changed, and&lt;/li&gt;&lt;li&gt;Line 25 - The total amount of the order is also greater than 50. If this is not the case, then the order variable that we set in line 15 will not be changed.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Line 28 - Remember how I said that the default priority for each order was set to "1". Here's where we set the priority. Note that we are setting the value in the "order" Rule variable. &lt;/li&gt;&lt;li&gt;Lines 31-38 - This rule sets the status for the 2nd highest priority ("Gold") customers. What's interesting in this rule is line 33 as it includes two criteria that must both be met in order for the fact to match the rule.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;The next Rules file that we'll look at picks up where MyBusinessRules.drl leaves off. This Rules file is named: MyBusinessRulesDiscount.drl&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;1:  package com.jboss.soa.esb.routing.cbr&lt;br /&gt;2:&lt;br /&gt;3:  #list any import classes here.&lt;br /&gt;4:  import org.jboss.soa.esb.message.Message;&lt;br /&gt;5:  import org.jboss.soa.esb.samples.quickstart.businessrules.dvdstore.OrderHeader;&lt;br /&gt;6:  import org.jboss.soa.esb.samples.quickstart.businessrules.dvdstore.Customer;&lt;br /&gt;7:&lt;br /&gt;8:  global java.util.List destinations;&lt;br /&gt;9:&lt;br /&gt;10:&lt;br /&gt;11:&lt;br /&gt;12:  rule "Logging"&lt;br /&gt;13:  salience 10&lt;br /&gt;14:  when&lt;br /&gt;15:    order: OrderHeader()&lt;br /&gt;16:    customer: Customer()&lt;br /&gt;17:  then&lt;br /&gt;18:    System.out.println("Customer Status: " + customer.getStatus());&lt;br /&gt;19:    System.out.println("Order Total: " + order.getTotalAmount());&lt;br /&gt;20:  end&lt;br /&gt;21:&lt;br /&gt;22:  rule "Customer Platinum Status"&lt;br /&gt;23:  salience 20&lt;br /&gt;24:   when&lt;br /&gt;25:    customer: Customer(status &amp;gt; 50)&lt;br /&gt;26:    order: OrderHeader(orderPriority == 3)&lt;br /&gt;27:   then&lt;br /&gt;28:    System.out.println("Platinum Customer - High Priority - Higher discount");&lt;br /&gt;29:    order.setOrderDiscount(8.5);&lt;br /&gt;30:  end&lt;br /&gt;31:&lt;br /&gt;32:  rule "Customer Gold Status"&lt;br /&gt;33:  salience 20&lt;br /&gt;34:   when&lt;br /&gt;35:    customer: Customer(status &amp;gt; 10, status &amp;lt;= 50)&lt;br /&gt;36:    order: OrderHeader(orderPriority == 2)&lt;br /&gt;37:   then&lt;br /&gt;38:    System.out.println("Gold Customer - Medium Priority - discount ");&lt;br /&gt;39:    order.setOrderDiscount(3.4);&lt;br /&gt;40:  end&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;&lt;li&gt;Lines 1-8 and the "Logging" rule should look familiar, so let's move on to the other rules defined in this file.&lt;/li&gt;&lt;li&gt;Line 13 - Remember how we talked about how rules are not executed in the exact sequence in which they can be viewed in a rules .drl file? This rule is assigned a salience property value of 10. Since this rule only prints out some logging information, it's assigned a lower salience than the other rules defined in the file.&lt;/li&gt;&lt;li&gt;Line 22 - This rule sets the discount level for the highest class of customers.&lt;/li&gt;&lt;li&gt;Line 23 - And, since we want to be sure that this rule fires, we assign it a salience property value of 20.&lt;/li&gt;&lt;li&gt;Lines 25-26 - This "when" clause is true when the rule is able to match both a Customer fact with a status greater than 50 and an OrderHeader fact with an orderPriority equal to 3. If both these conditions are true, then rule the customer and order variables are initialized from the Customer and and OrderHeader facts and the rule is fired.&lt;/li&gt;&lt;li&gt;Line 29 - Note that when the rule fires, the setOrderDiscount setter method is executed on the rule variable "order." The same setter method is executed on the OrderHeader fact in working memory. (Remember how we talked about how rules can both react to changes to facts in working memory and also cause changes on those facts? This is an example.) For the "Platinum" class of customers, we assign a generous discount.&lt;/li&gt;&lt;li&gt;Lines 32-39 - This rule follows the same pattern as the "Customer Platinum Status" rule. Note that we give the "Gold" class of customers a somewhat less generous discount.  ;-)&lt;/li&gt;&lt;/ul&gt;The third and final Rules file used by the quickstart controls the content-based routing used by the quickstart to route messages to services. In the SOA Platform, Rules is one of the supported mechanisms for implementing content based routing. In contrast to more static routing approaches, this form of message routing is relies on the content in the messages to dictate the route that a message takes. (For background on content based routing, please refer to this blog post:  &lt;a href="http://jboss-soa-p.blogspot.com/2009/07/when-content-knows-way-content-based.html"&gt;http://jboss-soa-p.blogspot.com/2009/07/when-content-knows-way-content-based.html &lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;This rules file is aptly named:  MyRoutingRules.drl&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;1:  package com.jboss.soa.esb.routing.cbr&lt;br /&gt;2:&lt;br /&gt;3:  #list any import classes here.&lt;br /&gt;4:  import org.jboss.soa.esb.message.Message;&lt;br /&gt;5:  import org.jboss.soa.esb.message.format.MessageType;&lt;br /&gt;6:  import org.jboss.soa.esb.samples.quickstart.businessrules.dvdstore.OrderHeader;&lt;br /&gt;7:&lt;br /&gt;8:  #declare any global variables here&lt;br /&gt;9:  global java.util.List destinations;&lt;br /&gt;10:&lt;br /&gt;11:&lt;br /&gt;12:   rule "Highest Priority Orders"&lt;br /&gt;13:&lt;br /&gt;14:       when&lt;br /&gt;15:           OrderHeader( orderPriority == 3 )&lt;br /&gt;16:       then&lt;br /&gt;17:           System.out.println("HIGHEST PRIORITY");&lt;br /&gt;18:           destinations.add("SuperSpecialCustomerService");&lt;br /&gt;19:&lt;br /&gt;20:   end&lt;br /&gt;21:&lt;br /&gt;22:   rule "Medium Priority Orders"&lt;br /&gt;23:&lt;br /&gt;24:       when&lt;br /&gt;25:           OrderHeader( orderPriority == 2 )&lt;br /&gt;26:       then&lt;br /&gt;27:           System.out.println("Medium Priority");&lt;br /&gt;28:           destinations.add("SpecialCustomerService");&lt;br /&gt;29:   end&lt;br /&gt;30:&lt;br /&gt;31:   rule "Low Priority Orders"&lt;br /&gt;32:&lt;br /&gt;33:       when&lt;br /&gt;34:           OrderHeader( orderPriority == 1 )&lt;br /&gt;35:       then&lt;br /&gt;36:           System.out.println("Low Priority");&lt;br /&gt;37:           destinations.add("RegularCustomerService");&lt;br /&gt;38:   end&lt;br /&gt;39:&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;ul  &gt;&lt;li&gt;Lines 1-6 - Once again, these import lines should look familiar.&lt;/li&gt;&lt;li&gt;Line 9 - Make note of the destinations List. We'll see this used when the messages are routed.&lt;/li&gt;&lt;li&gt;The rules in this rules file are pretty straight-forward. In each of the three rules we add the appropriate destination, based on the orderPriority in the OrderHeader, where that destination is a service that the quickstart deploys to the JBossESB in the SOA Platform.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;OK, those are the rules that we'll use in the quickstart. Let's now step through the quickstart as it is run.&lt;br /&gt;&lt;br /&gt;To deploy the quickstart, execute this ant target:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;1:  ant deploy&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;And, we then see this written to the server log:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;1:  22:20:57,568 INFO [QueueService] Queue[/queue/quickstart_Business_Rules_Request_GW] started, fullSize=200000, pageSize=2000, downCacheSize=2000&lt;br /&gt;2:  22:20:57,580 INFO [QueueService] Queue[/queue/quickstart_Business_Rules_Request_ESB] started, fullSize=200000, pageSize=2000, downCacheSize=2000&lt;br /&gt;3:  22:20:57,621 INFO [QueueService] Queue[/queue/quickstart_Business_Rules_ConciergeManager] started, fullSize=200000, pageSize=2000, downCacheSize=2000&lt;br /&gt;4:  22:20:57,632 INFO [QueueService] Queue[/queue/quickstart_Business_Rules_DistributionManager] started, fullSize=200000, pageSize=2000, downCacheSize=2000&lt;br /&gt;5:  22:20:57,643 INFO [QueueService] Queue[/queue/quickstart_Business_Rules_BasicShipping] started, fullSize=200000, pageSize=2000, downCacheSize=2000&lt;br /&gt;6:  22:20:57,682 INFO [EsbDeployment] Starting ESB Deployment 'Quickstart_business_rules_service.esb'&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;And to run it, exceute this ant target:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;1:  ant runtest&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;When the quickstart is run, here's what happens, step by step. Note that while we'll be examining most of the contents of the jboss-esb.xml file in detail, we'll be doing it in pieces or fragments so that it's easier to follow. The line numbers in each of these fragments will therefore be different from the actual (whole) file.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 1 - Create a Message and Pass it Through a Gateway to the Deployed Quickstart Application&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Like many of the SOA Platform quickstarts, the business_rules_service quickstart initiates its actions when a message is inserted into a queue that is being watched by a gateway listener. What's a gateway? On the JBossESB in the SPA Platform, everything is either a service that generates or consumes messages, or a message. That is, a message that is in the form (org.jboss.soa.esb.message) that the ESB understands. Services that can understand messages in this form are referred to as being "ESB-aware."&lt;br /&gt;&lt;br /&gt;How can you connect other, and potentially older, legacy applications over the ESB? By using gateways. A gateway (org.jboss.soa.esb.listeners.gateway) is a service that acts as a bridge between an ESB-aware and an ESB-unaware client and service. Gateways translate information between ESB and non-ESB message formats and EPRs. (EPR stands for endpoint reference.) Gateways are listener processes in that they "listen" for incoming communications. They are different from ESB-aware listeners in that they accept data in different formats such as objects in files or SQL tables. ESB-aware listeners can only accept messages in the org.jboss.soa.esb.message format.&lt;br /&gt;&lt;br /&gt;The SOA Platform supports these gateways:&lt;br /&gt;&lt;ul  &gt;&lt;li&gt;file gateways: local filesystem, ftp, sftp and ftps&lt;br /&gt;&lt;/li&gt;&lt;li&gt;JMS&lt;br /&gt;&lt;/li&gt;&lt;li&gt;HTTP/HTTPS&lt;br /&gt;&lt;/li&gt;&lt;li&gt;email (POP3)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;SQL table&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Hibernate&lt;/li&gt;&lt;/ul&gt;In the case of this quickstart, we'll use a JMS gateway to receive the JMS message. The gateway queue, and its corresponding ESB-aware queue are defined in the jms-provider section of the jboss-esb.xml file:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;1:  &amp;lt;jms-bus busid="quickstartGwChannel"&amp;gt;&lt;br /&gt;2:    &amp;lt;jms-message-filter dest-type="QUEUE"&lt;br /&gt;3:      dest-name="queue/quickstart_Business_Rules_Request_GW" /&amp;gt;&lt;br /&gt;4:  &amp;lt;/jms-bus&amp;gt;&lt;br /&gt;5:  &amp;lt;jms-bus busid="quickstartEsbChannel"&amp;gt;&lt;br /&gt;6:    &amp;lt;jms-message-filter dest-type="QUEUE"&lt;br /&gt;7:      dest-name="queue/quickstart_Business_Rules_Request_ESB" /&amp;gt;&lt;br /&gt;8:  &amp;lt;/jms-bus&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;And the listener is defined at the top of the "Business_Rules_Service" service definition:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;1:   &amp;lt;service category="Business_RulesServices"&lt;br /&gt;2:     name="Business_Rules_Service" description="The main entry point"&amp;gt;&lt;br /&gt;3:     &amp;lt;listeners&amp;gt;&lt;br /&gt;4:       &amp;lt;!-- Gateway --&amp;gt;&lt;br /&gt;5:         &amp;lt;jms-listener name="TheGateway"&lt;br /&gt;6:           busidref="quickstartGwChannel" is-gateway="true" /&amp;gt;&lt;br /&gt;7:         &amp;lt;jms-listener name="TheESBChannel"&lt;br /&gt;8:           busidref="quickstartEsbChannel" &amp;gt;&lt;br /&gt;9:         &amp;lt;/jms-listener&amp;gt;&lt;br /&gt;10:     &amp;lt;/listeners&amp;gt;&lt;br /&gt;11:     &amp;lt;actions mep="OneWay"&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;ul  &gt;&lt;li&gt;Note that on line 6, we identify the listener as a gateway.&lt;/li&gt;&lt;li&gt;Also note that on line 11, we define the mep, or "message exchange pattern." In the case of this quickstart, the pattern is "OneWay" which indicates that the message pattern is asynchronous. We're sending messages, but not waiting around (or blocking) for a response. &lt;/li&gt;&lt;/ul&gt;How do we generate this message? Take a look at the "runtest" target, specifically the classname, in the quickstart's ant build.xml file:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;1:  &amp;lt;target name="runtest" depends="compile"&lt;br /&gt;2:    description="willl receive JMS message to tigger the actions in the ESB"&amp;gt;&lt;br /&gt;3:    &amp;lt;echo&amp;gt;Runs Test JMS Sender&amp;lt;/echo&amp;gt;&lt;br /&gt;4:    &amp;lt;java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.businessrules.test.SendJMSMessage" failonerror="true"&amp;gt;&lt;br /&gt;5:      &amp;lt;classpath refid="exec-classpath" /&amp;gt;&lt;br /&gt;6:    &amp;lt;/java&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;That's right - we're sending a JMS message with a program named "SendJMSMessage." It's hard to get simpler than that. ;-)&lt;br /&gt;&lt;br /&gt;In order to simulate a realistic customer order in the message, SendJMSMessage builds the message from the quickstart's SampleOrder.xml file:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;1:  &amp;lt;Order orderId="1" orderDate="Wed Nov 15 13:45:28 EST 2006" statusCode="0"&lt;br /&gt;2:  netAmount="59.97" totalAmount="64.92" tax="4.95"&amp;gt;&lt;br /&gt;3:      &amp;lt;Customer userName="user1" firstName="Harry" lastName="Fletcher" state="SD"/&amp;gt;&lt;br /&gt;4:      &amp;lt;OrderLines&amp;gt;&lt;br /&gt;5:          &amp;lt;OrderLine position="1" quantity="1"&amp;gt;&lt;br /&gt;6:              &amp;lt;Product productId="364" title="The 40-Year-Old Virgin " price="29.98"/&amp;gt;&lt;br /&gt;7:          &amp;lt;/OrderLine&amp;gt;&lt;br /&gt;8:          &amp;lt;OrderLine position="2" quantity="1"&amp;gt;&lt;br /&gt;9:              &amp;lt;Product productId="299" title="Pulp Fiction" price="29.99"/&amp;gt;&lt;br /&gt;10:          &amp;lt;/OrderLine&amp;gt;&lt;br /&gt;11:      &amp;lt;/OrderLines&amp;gt;&lt;br /&gt;12:  &amp;lt;/Order&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;The SendJMSMessage class reads this file, creates a message object of type javax.jms.ObjectMessage (remember, this is an ESB-unaware message), and writes it to the queue (queue/quickstart_Business_Rules_Request_GW) on which our JMS gateway is listening. The listener receives the message and the ESB converts it to an ESB-aware message and then passes it onto the ESB through the queue/quickstart_Business_Rules_Request_ESB queue.&lt;br /&gt;&lt;br /&gt;Now it starts to get more interesting. &lt;br /&gt;&lt;br /&gt;Remember that our rules rely on certain types of facts (which are JavaBeans) being available in working memory. Where do these facts come from? We'll create them out of that message.&lt;br /&gt;&lt;br /&gt;&lt;b "&gt;Step 2 - Transform the Message into Beans&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The problem is that we have to have a way to create those facts out of the information in the message. Luckily, one of the tasks that the JBossESB in the SOA Platform performs is "transformation." The next action in the quickstart's action pipeline uses the smooks processing engine (&lt;a " href="http://www.smooks.org/" id="wx54" title="http://www.smooks.org/"&gt;http://www.smooks.org/&lt;/a&gt;) and the JBossESB's out-of-the-box "SmooksAction" action to perform the transformation of the information in the message into facts:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;1:  &amp;lt;action name="transform"&lt;br /&gt;2:    class="org.jboss.soa.esb.smooks.SmooksAction"&amp;gt;&lt;br /&gt;3:      &amp;lt;property name="smooksConfig" value="/smooks-res.xml" /&amp;gt;&lt;br /&gt;4:      &amp;lt;property name="resultType" value="JAVA" /&amp;gt;&lt;br /&gt;5:  &amp;lt;/action&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;The source code for the facts (remember that these are JavaBeans and have getter and setter methods) is in these source files in the quickstart:&lt;br /&gt;&lt;br /&gt;In: src/org/jboss/soa/esb/samples/quickstart/businessrules/dvdstore&lt;br /&gt;&lt;ul  &gt;&lt;li&gt;Customer.java&lt;/li&gt;&lt;li&gt;OrderHeader.java&lt;/li&gt;&lt;li&gt;OrderItem.java&lt;/li&gt;&lt;/ul&gt;The quickstart uses the smooks-res.xml file to perform the transformation. Let's take a look at this file.&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;1:  &amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;&lt;br /&gt;2:  &amp;lt;smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"&lt;br /&gt;3:             xmlns:jb="http://www.milyn.org/xsd/smooks/javabean-1.2.xsd"&amp;gt;&lt;br /&gt;4:&lt;br /&gt;5:    &amp;lt;!-- Populate the OrderHeader --&amp;gt;&lt;br /&gt;6:    &amp;lt;jb:bean beanId="orderHeader" class="org.jboss.soa.esb.samples.quickstart.businessrules.dvdstore.OrderHeader" createOnElement="order"&amp;gt;&lt;br /&gt;7:      &amp;lt;jb:value property="orderId"   data="Order/@orderId" /&amp;gt;&lt;br /&gt;8:      &amp;lt;jb:value property="orderDate"  data="Order/@orderDate" decoder="Calendar"&amp;gt;&lt;br /&gt;9:        &amp;lt;jb:decodeParam name="format"&amp;gt;EEE MMM dd HH:mm:ss z yyyy&amp;lt;/jb:decodeParam&amp;gt;&lt;br /&gt;10:              &amp;lt;jb:decodeParam name="locale-language"&amp;gt;en&amp;lt;/jb:decodeParam&amp;gt;&lt;br /&gt;11:        &amp;lt;jb:decodeParam name="locale-country"&amp;gt;US&amp;lt;/jb:decodeParam&amp;gt;&lt;br /&gt;12:      &amp;lt;/jb:value&amp;gt;&lt;br /&gt;13:      &amp;lt;jb:value property="statusCode" data="Order/@statusCode" /&amp;gt;&lt;br /&gt;14:      &amp;lt;jb:value property="netAmount"  data="Order/@netAmount" /&amp;gt;&lt;br /&gt;15:      &amp;lt;jb:value property="totalAmount" data="Order/@totalAmount" /&amp;gt;&lt;br /&gt;16:      &amp;lt;jb:value property="tax"     data="Order/@tax" /&amp;gt;&lt;br /&gt;17:    &amp;lt;/jb:bean&amp;gt;&lt;br /&gt;18:&lt;br /&gt;19:    &amp;lt;!-- Populate the Customer --&amp;gt;&lt;br /&gt;20:    &amp;lt;jb:bean beanId="customer" class="org.jboss.soa.esb.samples.quickstart.businessrules.dvdstore.Customer" createOnElement="customer"&amp;gt;&lt;br /&gt;21:       &amp;lt;jb:value property="userName" data="customer/@userName" /&amp;gt;&lt;br /&gt;22:       &amp;lt;jb:value property="firstName" data="customer/@firstName" /&amp;gt;&lt;br /&gt;23:       &amp;lt;jb:value property="lastName" data="customer/@lastName" /&amp;gt;&lt;br /&gt;24:       &amp;lt;jb:value property="state"   data="customer/@state" /&amp;gt;&lt;br /&gt;25:    &amp;lt;/jb:bean&amp;gt;&lt;br /&gt;26:&lt;br /&gt;27:    &amp;lt;!-- Populate the OrderItem list --&amp;gt;&lt;br /&gt;28:    &amp;lt;jb:bean beanId="orderItemList" class="java.util.ArrayList" createOnElement="orderlines"&amp;gt;&lt;br /&gt;29:       &amp;lt;jb:wiring beanIdRef="orderItem" /&amp;gt;&lt;br /&gt;30:    &amp;lt;/jb:bean&amp;gt;&lt;br /&gt;31:&lt;br /&gt;32:     &amp;lt;!-- Populate the OrderItem instance --&amp;gt;&lt;br /&gt;33:     &amp;lt;jb:bean beanId="orderItem" class="org.jboss.soa.esb.samples.quickstart.businessrules.dvdstore.OrderItem" createOnElement="orderlines/orderline"&amp;gt;&lt;br /&gt;34:       &amp;lt;jb:value property="position" data="orderline/@position" /&amp;gt;&lt;br /&gt;35:       &amp;lt;jb:value property="quantity" data="orderline/@quantity" /&amp;gt;&lt;br /&gt;36:       &amp;lt;jb:value property="productId" data="orderline/product/@productId" /&amp;gt;&lt;br /&gt;37:       &amp;lt;jb:value property="title"   data="orderline/product/@title" /&amp;gt;&lt;br /&gt;38:       &amp;lt;jb:value property="price"   data="orderline/product/@price" /&amp;gt;&lt;br /&gt;39:    &amp;lt;/jb:bean&amp;gt;&lt;br /&gt;40:&lt;br /&gt;41:   &amp;lt;/smooks-resource-list&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;That's right - it's using XPath (http://www.w3.org/TR/xpath/) to parse the information in the message into Customer (starting at line NN), OrderHeader (starting at line NN), and OrderItem.java (starting at line NN) JavaBeans and a java.util.ArrayList object that contains a list of the orders. &lt;br /&gt;&lt;br /&gt;&lt;b "&gt;Step 3 - And Add the Beans Back into the Message&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;What happens next? Well, we have the original message, and some JavaBeans. But, remember that on the JBossESB in the SOA Platform, everything is either a message or a service. What we need is some way to get those JavaBeans back into the message. The way that we do this is with the next action in the action pipeline:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;1:  &amp;lt;action name="map_order_components" class="org.jboss.soa.esb.actions.scripting.GroovyActionProcessor"&amp;gt;&lt;br /&gt;2:    &amp;lt;property name="script" value="/map_order_components.groovy" /&amp;gt;&lt;br /&gt;3:  &amp;lt;/action&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;GroovyActionProcessor is another of the SOA Platform's out-of-the-box actions. The groovy script referenced by the action takes the JavaBeans that we just created and adds them (note the use of the beanId's that we defined in the smooks-res.xml file) back into the message with property names that match the bean IDs. The script is very short - lines 3 and 4 add the orderHeard and customer to the message body:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;1:    // Need to map down the orderHeader and customer beans onto the message&lt;br /&gt;2:    // to make them available to the ObjectMapper...&lt;br /&gt;3:    message.getBody().add("orderHeader", message.getBody().get().get("orderHeader"));&lt;br /&gt;4:    message.getBody().add("customer", message.getBody().get().get("customer"));&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;Now we have the JavaBeans in the message. What happens next? The quickstart updates the customer status (it's set to a value of "0" in the JMS message that started the quickstart) with the "UpdateCustomerStatus" custom action:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;1:  &amp;lt;!-- Update Customer Status --&amp;gt;&lt;br /&gt;2:  &amp;lt;action name="updateCustomerStatus"&lt;br /&gt;3:    class="org.jboss.soa.esb.samples.quickstart.businessrules.UpdateCustomerStatus"&amp;gt;&lt;br /&gt;4:      &amp;lt;property name="status" value="60"/&amp;gt;&lt;br /&gt;5:  &amp;lt;/action&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;We'll set this to a value of 60 as the customer is in the platinum customer class. (Hint: For extra credit, try the quickstart with different status values.)&lt;br /&gt;&lt;br /&gt;Here's the output in the log - this line is printed by the org.jboss.soa.esb.samples.quickstart.businessrules.UpdateCustomerStatus custom action:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;1:  21:42:15,793 INFO [STDOUT] { Updated customer status to 60}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;b "&gt;Step 4 - Process the Message with the BusinessRulesProcessor&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;OK - now we can see the BusinessRulesProcessor execute in the next action:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;1:    &amp;lt;!-- Use the BRP to calculate the order priority --&amp;gt;&lt;br /&gt;2:     &amp;lt;action&lt;br /&gt;3:      class="org.jboss.soa.esb.actions.BusinessRulesProcessor"&lt;br /&gt;4:        name="BRP"&amp;gt;&lt;br /&gt;5:          &amp;lt;property name="ruleSet"&lt;br /&gt;6:            value="MyBusinessRules.drl" /&amp;gt;&lt;br /&gt;7:          &amp;lt;property name="ruleReload" value="true" /&amp;gt;&lt;br /&gt;8:          &amp;lt;property name="object-paths"&amp;gt;&lt;br /&gt;9:            &amp;lt;object-path esb="body.orderHeader" /&amp;gt;&lt;br /&gt;10:           &amp;lt;object-path esb="body.customer" /&amp;gt;&lt;br /&gt;11:          &amp;lt;/property&amp;gt;&lt;br /&gt;12:    &amp;lt;/action&amp;gt;&lt;br /&gt;13:&lt;br /&gt;14:    &amp;lt;action name="reviewMessage1"&lt;br /&gt;15:      class="org.jboss.soa.esb.samples.quickstart.businessrules.ReviewMessage"&amp;gt;&lt;br /&gt;16:        &amp;lt;property name="stuff" value="After Order Priority"/&amp;gt;&lt;br /&gt;17:    &amp;lt;/action&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;&lt;li  &gt;Line 1 - Comments are always good things!  ;-)&lt;/li&gt;&lt;li  &gt;Line 2 - Here's the start of the action that makes use of the BusinessRulesProcessor.&lt;/li&gt;&lt;li  &gt;Line 3 - And here's the reference to the BusinessRulesProcessor class.&lt;/li&gt;&lt;li  &gt;Lines 5-6 - And, here's the reference to the Rules file that we want to execute.&lt;/li&gt;&lt;li  &gt;Line 7 - This property causes the Rule to be if the file changes.&lt;/li&gt;&lt;li  &gt;Lines 8-11 - And, here are the objects that we added to the message - remember the map_order_components.groovy file?&lt;/li&gt;&lt;/ul&gt;So, what just happened? We made the orderHeader and customer objects available to the Rules defined in MyBusinessRules.drl and executed the Rules. The net effect of this is that the priority of the order defined in the message should have changed. The next action in the action pipeline writes this to the log:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;1:  21:42:15,931 INFO [STDOUT] Platinum Customer - High Priority&lt;br /&gt;2:  21:42:15,932 INFO [STDOUT] Customer Status: 60&lt;br /&gt;3:  21:42:15,932 INFO [STDOUT] Order Total: 64.92&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;The first three lines are printed by the rules. Remember how the rules all included System.out.prinln statements? And how the logging rule that prints the customer status and order total has a lower value salience property than the rules that set and print the customer priority? That explains the order in which the statements are printed to the log.&lt;br /&gt;&lt;br /&gt;And then these lines are printed by the org.jboss.soa.esb.samples.quickstart.businessrules.ReviewMessage cusom action:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;1:  21:42:15,932 INFO [STDOUT] { ================ After Order Priority&lt;br /&gt;2:  21:42:15,933 INFO [STDOUT] Customer: user1,Harry,Fletcher,SD,60&lt;br /&gt;3:  21:42:15,933 INFO [STDOUT] Order Priority: 3&lt;br /&gt;4:  21:42:15,933 INFO [STDOUT] Order Discount: 0.0&lt;br /&gt;5:  21:42:15,933 INFO [STDOUT] Order Total: 64.92&lt;br /&gt;6:  21:42:15,933 INFO [STDOUT] } ================ After Order Priority&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;The rule "Highest Priority Orders" defined in MyBusinessRules.drl has set the order priority to 3.&lt;br /&gt;&lt;br /&gt;Next, the quickstart calls the BusinessRulesProcessor again, this time to determine the order discount:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;1:   &amp;lt;!-- Use the BRP to calculate the order discount --&amp;gt;&lt;br /&gt;2:   &amp;lt;action&lt;br /&gt;3:     class="org.jboss.soa.esb.actions.BusinessRulesProcessor"&lt;br /&gt;4:       name="BRP2"&amp;gt;&lt;br /&gt;5:       &amp;lt;property name="ruleSet"&lt;br /&gt;6:         value="MyBusinessRulesDiscount.drl" /&amp;gt;&lt;br /&gt;7:       &amp;lt;property name="ruleReload" value="true" /&amp;gt;&lt;br /&gt;8:       &amp;lt;property name="object-paths"&amp;gt;&lt;br /&gt;9:         &amp;lt;object-path esb="body.orderHeader" /&amp;gt;&lt;br /&gt;10:         &amp;lt;object-path esb="body.customer" /&amp;gt;&lt;br /&gt;11:       &amp;lt;/property&amp;gt;&lt;br /&gt;12:    &amp;lt;/action&amp;gt;&lt;br /&gt;13:&lt;br /&gt;14:    &amp;lt;action name="reviewMessage2"&lt;br /&gt;15:      class="org.jboss.soa.esb.samples.quickstart.businessrules.ReviewMessage"&amp;gt;&lt;br /&gt;16:      &amp;lt;property name="stuff" value="After Order Discount"/&amp;gt;&lt;br /&gt;17:    &amp;lt;/action&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;ul  &gt;&lt;li&gt;Line 6 - The  rule "Customer Platinum Status" defined in the MyBusinessRulesDiscount.drl file is executed as our customer has both the highest priority as well as the status value of 60. That rule and the logging rule print out these statements to the log in this order:&lt;/li&gt;&lt;/ul&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;1:  21:42:16,062 INFO [STDOUT] Platinum Customer - High Priority - Higher discount&lt;br /&gt;2:  21:42:16,063 INFO [STDOUT] Customer Status: 60&lt;br /&gt;3:  21:42:16,063 INFO [STDOUT] Order Total: 64.92&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;Next, the org.jboss.soa.esb.samples.quickstart.businessrules.ReviewMessage custom action is executed to print these statements to the log:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;1:  21:42:16,063 INFO [STDOUT] { ================ After Order Discount&lt;br /&gt;2:  21:42:16,063 INFO [STDOUT] Customer: user1,Harry,Fletcher,SD,60&lt;br /&gt;3:  21:42:16,064 INFO [STDOUT] Order Priority: 3&lt;br /&gt;4:  21:42:16,064 INFO [STDOUT] Order Discount: 8.5&lt;br /&gt;5:  21:42:16,064 INFO [STDOUT] Order Total: 64.92&lt;br /&gt;6:  21:42:16,064 INFO [STDOUT] } ================ After Order Discount&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;And there we see our generous 8.5% discount.&lt;br /&gt;&lt;br /&gt;Next, the quickstart prints the entire message to the log with this out of the box action:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;1:  &amp;lt;action name="sout" class="org.jboss.soa.esb.actions.SystemPrintln" /&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;And here's how it appears in the server.log:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;1:  21:42:16,064 INFO [STDOUT] Message structure:&lt;br /&gt;2:  21:42:16,064 INFO [STDOUT] [{orderHeader=1, java.util.GregorianCalendar[time=1163616328000,areFieldsSet=true,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id="US/Eastern",offset=-18000000,dstSavings=3600000,useDaylight=true,transitions=235,lastRule=java.util.SimpleTimeZone[id=US/Eastern,offset=-18000000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=3,startMonth=2,startDay=8,startDayOfWeek=1,startTime=7200000,startTimeMode=0,endMode=3,endMonth=10,endDay=1,endDayOfWeek=1,endTime=7200000,endTimeMode=0]],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=?,YEAR=2006,MONTH=10,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=15,DAY_OF_YEAR=?,DAY_OF_WEEK=4,DAY_OF_WEEK_IN_MONTH=?,AM_PM=?,HOUR=?,HOUR_OF_DAY=13,MINUTE=45,SECOND=28,MILLISECOND=?,ZONE_OFFSET=-18000000,DST_OFFSET=0], 0, 59.97, 64.92, 4.95, , orderItemList=[1,1,364,The 40-Year-Old Virgin ,29.98, 2,1,299,Pulp Fiction,29.99], orderItem=2,1,299,Pulp Fiction,29.99, customer=user1,Harry,Fletcher,SD,60}].&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;That's a little hard to read. Let's take out the order date/time so that we can better see the customer and orderHeader Beans that we added to the message:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;1:  {&lt;br /&gt;2:  orderHeader=1, 0, 59.97, 64.92, 4.95,&lt;br /&gt;3:  orderItemList=[1,1,364,The 40-Year-Old Virgin ,29.98, 2,1,299,Pulp Fiction,29.99],&lt;br /&gt;4:  orderItem=2,1,299,Pulp Fiction,29.99,&lt;br /&gt;5:  customer=user1,Harry,Fletcher,SD,60&lt;br /&gt;6:  }&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;b "&gt;Step 5 - Route the Message to its Destination Based on its Content&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;At this point, the quickstart has finished using the BusinessRulesProcessor, but it's not yet done using Rules. Remember how I said that on the JBossESB in the SOA Platform everything is either a message or a service? Well, one of the main functions performed by the ESB is to route messages to the correct service. These routes can be static, or they can be dynamic, based on the content of a message. Here's where content based routing with Rules comes in. The routing rules are defined in the MyRoutingRules.drl file. Remember how the rules in this file designated the "destinations" of the messages? This next action uses invokes the org.jboss.soa.esb.actions.ContentBasedRouter class to route the messages to their intended destinations.&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;1:  1  &amp;lt;!-- Use the CBR to route the "scored" order to the appropriate service team --&amp;gt;&lt;br /&gt;2:  2  &amp;lt;action&lt;br /&gt;3:  3    class="org.jboss.soa.esb.actions.ContentBasedRouter"&lt;br /&gt;4:  4     name="ContentBasedRouter"&amp;gt;&lt;br /&gt;5:  5       &amp;lt;property name="ruleSet" value="MyRoutingRules.drl" /&amp;gt;&lt;br /&gt;6:  6       &amp;lt;property name="ruleReload" value="true" /&amp;gt;&lt;br /&gt;7:  7       &amp;lt;property name="destinations"&amp;gt;&lt;br /&gt;8:  8         &amp;lt;route-to&lt;br /&gt;9:  9           destination-name="SuperSpecialCustomerService"&lt;br /&gt;10:  10          service-category="ConciergeManager" service-name="ConciergeService" /&amp;gt;&lt;br /&gt;11:  11       &amp;lt;route-to&lt;br /&gt;12:  12         destination-name="SpecialCustomerService"&lt;br /&gt;13:  13         service-category="DistributionManager" service-name="DistributionService" /&amp;gt;&lt;br /&gt;14:  14       &amp;lt;route-to&lt;br /&gt;15:  15         destination-name="RegularCustomerService"&lt;br /&gt;16:  16         service-category="BasicShipping" service-name="ShipperService" /&amp;gt;&lt;br /&gt;17:  17       &amp;lt;/property&amp;gt;&lt;br /&gt;18:  18       &amp;lt;property name="object-paths"&amp;gt;&lt;br /&gt;19:  19         &amp;lt;object-path esb="body.orderHeader" /&amp;gt;&lt;br /&gt;20:  20         &amp;lt;object-path esb="body.customer" /&amp;gt;&lt;br /&gt;21:  21       &amp;lt;/property&amp;gt;&lt;br /&gt;22:  22 &amp;lt;/action&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;ul  &gt;&lt;li&gt;Lines 107-109, 110-112, and 113-115 define the routes. Since our message now has the highest priority, it is routed to the ConciergeService.&lt;/li&gt;&lt;/ul&gt;Here's what the log shows us. Again, the first line is printed by the rule:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;1:  21:42:16,210 INFO [STDOUT] HIGHEST PRIORITY&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;And the remaining lines are printed by the org.jboss.soa.esb.samples.quickstart.businessrules.ReviewMessage custom action as invoked by the ConciergeService.&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;1:  21:42:16,309 INFO [STDOUT] { ================ Concierge&lt;br /&gt;2:  21:42:16,309 INFO [STDOUT] Customer: user1,Harry,Fletcher,SD,60&lt;br /&gt;3:  21:42:16,309 INFO [STDOUT] Order Priority: 3&lt;br /&gt;4:  21:42:16,309 INFO [STDOUT] Order Discount: 8.5&lt;br /&gt;5:  21:42:16,310 INFO [STDOUT] Order Total: 64.92&lt;br /&gt;6:  21:42:16,310 INFO [STDOUT] } ================ Concierge&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;Well, the customer's order was delivered to the very posh ConciergeService, and the quickstart's execution is complete.&lt;br /&gt;&lt;br /&gt;&lt;b "&gt;Closing Thoughts&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;OK, let's review what happened. The quickstart defines multiple business rules to examine and modify a message as it is processed by actions executed by ESB services, then it routes that message to the correct destination service. The rules are maintained in .drl files, separate from the services' custom action code, which makes it easier to maintain them. &lt;br /&gt;&lt;br /&gt;And, notice what the quickstart did not have to do - the rules were  executed and the content based routing was performed through out of the box actions provided by the SOA Platform's JBossESB. This made it possible for the quickstart to concentrate on the Rules business logic.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Acknowledgements&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;As always, I want to thank the JBoss SOA Platform team and community (especially Kevin Conner and Mark Proctor for their timely review input for this blog post).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;References&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;JBoss SOA Platform (&lt;a href="http://www.jboss.com/products/platforms/soa/" id="iv35" title="http://www.jboss.com/products/platforms/soa/"&gt;http://www.jboss.com/products/platforms/soa/&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;JBoss BRMS Platform (&lt;a href="http://www.jboss.com/products/platforms/brms/" id="ril9" title="http://www.jboss.com/products/platforms/brms/"&gt;http://www.jboss.com/products/platforms/brms/&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;JBossESB Project (&lt;a href="http://www.jboss.org/jbossesb" id="aors" title="http://www.jboss.org/jbossesb"&gt;http://www.jboss.org/jbossesb&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;JBoss Drools Project (&lt;a href="http://www.jboss.org/drools" id="pu43" title="http://www.jboss.org/drools"&gt;http://www.jboss.org/drools&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;JBoss Smooks Project (&lt;a href="http://www.smooks.org/" id="zh77" title="http://www.smooks.org"&gt;http://www.smooks.org&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;JBoss Drools Business Rules by Paul Browne (published by Packt Publishing) (&lt;a href="https://www.packtpub.com/jboss-drools-business-rules/book" id="s7nj" title="https://www.packtpub.com/jboss-drools-business-rules/book"&gt;https://www.packtpub.com/jboss-drools-business-rules/book&lt;/a&gt;)&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9094589327053503491-2814277740108983110?l=jboss-soa-p.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jboss-soa-p.blogspot.com/feeds/2814277740108983110/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9094589327053503491&amp;postID=2814277740108983110' title='16 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/2814277740108983110'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/2814277740108983110'/><link rel='alternate' type='text/html' href='http://jboss-soa-p.blogspot.com/2010/07/jbossesb-drools-integration-in-jboss.html' title='The JBossESB-Drools Integration in the JBoss SOA Platform'/><author><name>Len DiMaggio</name><uri>http://www.blogger.com/profile/07124585546929851174</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='20' src='http://1.bp.blogspot.com/_Wad47xG7w3A/Sc7b75epEEI/AAAAAAAAAQ4/F9-h0znUI7w/S220/Boston.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_Wad47xG7w3A/TCFsEhzhIDI/AAAAAAAABfI/IYlvQT84jkY/s72-c/brms.jpg' height='72' width='72'/><thr:total>16</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9094589327053503491.post-1326530163609669521</id><published>2010-04-29T14:42:00.001-07:00</published><updated>2010-04-29T14:43:50.534-07:00</updated><title type='text'>SOA Governance</title><content type='html'>I wrote an article on SOA Governance last year but they forgot to let me know it had been published. &lt;a href="http://www.ebizq.net/topics/soa/features/11174.html?page=1"&gt;Better late than never&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9094589327053503491-1326530163609669521?l=jboss-soa-p.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jboss-soa-p.blogspot.com/feeds/1326530163609669521/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9094589327053503491&amp;postID=1326530163609669521' title='14 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/1326530163609669521'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/1326530163609669521'/><link rel='alternate' type='text/html' href='http://jboss-soa-p.blogspot.com/2010/04/soa-governance.html' title='SOA Governance'/><author><name>Mark Little</name><uri>http://www.blogger.com/profile/15072917010265365428</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>14</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9094589327053503491.post-5172992320036013720</id><published>2010-04-20T19:35:00.000-07:00</published><updated>2010-04-20T19:36:34.572-07:00</updated><title type='text'>Cross Posting to DZone</title><content type='html'>The previous post - on JMS Transactions - is now also on DZone:&lt;br /&gt;&lt;br /&gt;   &lt;a href="http://soa.dzone.com/articles/jms-transactions-soa-platform"&gt;http://soa.dzone.com/articles/jms-transactions-soa-platform&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9094589327053503491-5172992320036013720?l=jboss-soa-p.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jboss-soa-p.blogspot.com/feeds/5172992320036013720/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9094589327053503491&amp;postID=5172992320036013720' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/5172992320036013720'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/5172992320036013720'/><link rel='alternate' type='text/html' href='http://jboss-soa-p.blogspot.com/2010/04/cross-posting-to-dzone.html' title='Cross Posting to DZone'/><author><name>Len DiMaggio</name><uri>http://www.blogger.com/profile/07124585546929851174</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='20' src='http://1.bp.blogspot.com/_Wad47xG7w3A/Sc7b75epEEI/AAAAAAAAAQ4/F9-h0znUI7w/S220/Boston.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9094589327053503491.post-7349855009782117187</id><published>2010-04-14T07:19:00.000-07:00</published><updated>2010-04-14T19:28:12.213-07:00</updated><title type='text'>JMS Transactions and the SOA Platform</title><content type='html'>&lt;span style="font-weight: bold; font-style: italic;"&gt;The Server's Down - And What's Worse, I Lost my Money!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Regardless of how carefully you plan, it's inevitable that the software you build will encounter a situation or chain of events that you did not anticipate, and experience some type of failure. (Trust me on this. I work in software testing and spend most of my waking hours either causing software failures, or debugging them.) Since it is impossible to avoid every failure, the ability to recover from failures is a crucial part of every software system design.&lt;br /&gt;&lt;br /&gt;A classic type of failure involves moving money between bank accounts. It's a 2-phase set of actions. First, money is withdrawn from one account and, second, the money is deposited into a second account. This sounds simple, right? Well, suppose that the the system encounters a failure after it has withdrawn the money from the first account, but before it has had a chance to deposit into the second account? What happens to the money? How can you avoid losing this money? The answer is that you enclose these two actions into a transaction.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;Transactions and ACID Properties&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;What exactly is a "transaction?" Like a lot of things in software, it's a buzzword that is overused. But beyond that, a transaction is a logical grouping of actions into a single larger action, where this larger action is performed, or not performed, based on an all-or-nothing evaluation of the results of the individual actions&lt;a href="#[1]"&gt;[1]&lt;/a&gt;. In the case of the transfer of money example we just mentioned, wrapping the two transfers into a transaction would ensure that if either transfer failed, your money would not be lost, and both accounts would be restored to their original condition.&lt;br /&gt;&lt;br /&gt;Transactions are frequently described in terms of having an "ACID"&lt;a href="#[2]"&gt;[2]&lt;/a&gt; set of properties:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Atomicity&lt;/span&gt; - When we talk about wanting a transaction to be "atomic" what we mean is that we want the transaction, which will be made up of a set of individual actions, to be treated as a single atomic unit. If any of these actions fails, such as one of the bank account transfers in our example, then the entire transaction is canceled. (The term used for this is "rolled back.") A transaction is an all-or-nothing construct. All the actions enclosed by the transaction must be completed successfully before the transaction itself is completed (or "committed.")&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Consistency&lt;/span&gt; - Transactions don't leave the data that it works on in a partially finished state. If a transaction rolls back, the data or database in question is returned to the (consistent) state that it was in before the transaction started.&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Isolation&lt;/span&gt; - In the context of a transaction, "isolation" refers to how any conditions or state created by a transaction are not visible to any other transaction. For example, if our bank account transfer was executed in a transaction, then while it was executing, any other transactions or operations would not be able to see any of results of the transaction until the entire transaction had completed.&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Durability&lt;/span&gt; - One of the dangers of the bank account transfer example, if it were to be attempted outside of a transaction, is that if something went wrong, data (or even worse, money!) would be lost. Because a transaction guarantees the consistency of the data, that data is durable. If the transaction rolls back, the original data is restored.&lt;/li&gt;&lt;/ul&gt;   &lt;span style="font-weight: bold; font-style: italic;"&gt;Transactions and the SOA Platform's JBossESB&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;OK, this is all interesting, but it sounds like something better suited to databases than Service Oriented Architecture. How does a transactional model apply to the JBossESB in the SOA Platform where everything is either a message or a service?&lt;br /&gt;&lt;br /&gt;Here's how: some transports supported by the Platform (InVM&lt;a href="#[3]"&gt;[3]&lt;/a&gt; and JMS) support a transactional delivery of messages. The actual delivery of that message will not happen until the transaction is committed. How can you cause a rollback of a transaction in an action pipeline to occur? By configuring the application and its services to include the transaction and then by raising a RuntimeException in the action pipeline. The best way to explain and illustrate how this is with one of the SOA Platform's "quickstart" example programs. Let's take a look.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;The Quickstart&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;One of the great features of the SOA Platform is its extensive, and always growing, set of "quickstart" programs. These programs illustrate various features supported by the Platform and serve as a great resource for writing your own applications. For our example, we'll look at the aptly named "jms_transacted" quickstart.&lt;br /&gt;&lt;br /&gt;This quickstart illustrates using the JMS transport with the JBossESB in the SOA Platform to handle transactions. The quickstart also shows how message redelivery can be performed with the JMS transport. Before we examine the quickstart's code, configuration files, and actual output, it's important that we make note of the quickstart's use of JCA (Java Connector Architecture) &lt;a href="#[4]"&gt;[4]&lt;/a&gt;. JCA provides a standardized way to connect to JMS providers. For the JBossESB in the SOA Platform, jms-jca-providers provide transaction support for the action pipeline by enclosing actions in a JTA &lt;a href="#[5]"&gt;[5]&lt;/a&gt; transaction. These transactions ensure that messages are handled within an enclosing transaction. If something goes wrong in the transaction, the messages are put back into the JMS queues to be reprocessed. We'll see this in action when we run the quickstart.&lt;br /&gt;&lt;br /&gt;The sequence of actions that the quickstart performs is:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Like many of the SOA Platform's quickstarts, things begin by having a JMS message routed to a service to start the action pipeline.&lt;/li&gt;&lt;li&gt;  The first time that the pipeline is entered, a row is inserted into the quickstart's HSQLDB database. Note that while the SOA Platform supports multiple databases such as MySQL, Oracle, PostgreSQL and others, in production environments, it includes a fully functional HSQLDB database for demonstration purposes.&lt;/li&gt;&lt;li&gt;  Then, the org.jboss.soa.esb.samples.quickstart.jmstransacted.test.ThrowExceptionAction class is called to raise an exception. This action class is configured to raise the exception (5) times, so as to force a rolback of the transaction that encloses the writes to the database. Each time that the exception is raised, the JCA adapter rolls back the transaction. The exception is also propagated to the JCA adapter and written error messages to the log.&lt;/li&gt;&lt;li&gt;  After the configured limit of (5) rollbacks is reached, the org.jboss.soa.esb.samples.quickstart.jmstransacted.test.DBInsertAction class completes and the transaction is committed by the SOA Platform's JBossESB's org/jboss/soa/esb/common/JBossESBTransactionService class so that the net result is only one row written to the database.&lt;/li&gt;&lt;/ul&gt;Now, we'll take a detailed look at how this transaction is configured, and just what happens as the quickstart runs.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;The Quickstart - In Detail&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The transaction in quickstart includes both JMS messaging and writing to a database. Let's start by examining the connection to the HSQLDB database that the quickstart uses. First, we need to create a datasource definition to connect to the database.&lt;br /&gt;&lt;br /&gt;In file: quickstart-ds.xml&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;1   &amp;lt;datasources&amp;gt;&lt;br /&gt;2   &amp;lt;local-tx-datasource&amp;gt;&lt;br /&gt;3      &amp;lt;jndi-name&amp;gt;JmsTransactedDB&amp;lt;/jndi-name&amp;gt;&lt;br /&gt;4      &amp;lt;connection-url&amp;gt;jdbc:hsqldb:hsql://localhost:1706&amp;lt;/connection-url&amp;gt;&lt;br /&gt;5      &amp;lt;driver-class&amp;gt;org.hsqldb.jdbcDriver&amp;lt;/driver-class&amp;gt;&lt;br /&gt;6      &amp;lt;user-name&amp;gt;sa&amp;lt;/user-name&amp;gt;&lt;br /&gt;7      &amp;lt;password&amp;gt;&amp;lt;/password&amp;gt;&lt;br /&gt;8      &amp;lt;min-pool-size&amp;gt;5&amp;lt;/min-pool-size&amp;gt;&lt;br /&gt;9      &amp;lt;max-pool-size&amp;gt;20&amp;lt;/max-pool-size&amp;gt;&lt;br /&gt;10     &amp;lt;idle-timeout-minutes&amp;gt;0&amp;lt;/idle-timeout-minutes&amp;gt;&lt;br /&gt;11     &amp;lt;depends&amp;gt;jboss:service=JmsTransactedDB&amp;lt;/depends&amp;gt;&lt;br /&gt;12     &amp;lt;prepared-statement-cache-size&amp;gt;32&amp;lt;/prepared-statement-cache-size&amp;gt;&lt;br /&gt;13  &amp;lt;/local-tx-datasource&amp;gt;&lt;br /&gt;14&lt;br /&gt;15  &amp;lt;mbean code="org.jboss.internal.soa.esb.dependencies.HypersonicDatabase"&lt;br /&gt;16     name="jboss:service=JmsTransactedDB"&amp;gt;&lt;br /&gt;17     &amp;lt;attribute name="Port"&amp;gt;1706&amp;lt;/attribute&amp;gt;&lt;br /&gt;18     &amp;lt;attribute name="BindAddress"&amp;gt;localhost&amp;lt;/attribute&amp;gt;&lt;br /&gt;19     &amp;lt;attribute name="Database"&amp;gt;JmsTransactedDB&amp;lt;/attribute&amp;gt;&lt;br /&gt;20     &amp;lt;attribute name="Silent"&amp;gt;true&amp;lt;/attribute&amp;gt;&lt;br /&gt;21     &amp;lt;attribute name="Trace"&amp;gt;false&amp;lt;/attribute&amp;gt;&lt;br /&gt;22     &amp;lt;attribute name="No_system_exit"&amp;gt;true&amp;lt;/attribute&amp;gt;&lt;br /&gt;23     &amp;lt;attribute name="DataDir"&amp;gt;${jboss.server.data.dir}&amp;lt;/attribute&amp;gt;&lt;br /&gt;24  &amp;lt;/mbean&amp;gt;&lt;br /&gt;25  &amp;lt;/datasources&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;Some items to make note of here are:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Line 3 - We're defining a local-tx-datasource as we will want a JCA connection with transaction support&lt;a href="#[6]"&gt;[6]&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;  Line 4 - We're use this JNDI name to reference the datasource.&lt;/li&gt;&lt;li&gt;  Lines 5-13 - DB driver class, connection, URL, username/password, etc. for the database connection&lt;/li&gt;&lt;li&gt;Line 12 - MBean interface for running Hypersonic in the same VM with JBoss - note that the service name and the JNDI name as we'll refer to them later.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;OK, we have a datasource that we can use to get to the HSQLDB database, and get us there in a mode that supports transactions. What's next? We have to ensure that our database actually exists before we try to use it! Luckily, the SOA Platform has a class that can initialize our database when the .esb application is deployed.&lt;br /&gt;&lt;br /&gt;In file: jbossesb-service.xml&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;1  &amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;2&lt;br /&gt;3  &amp;lt;server&amp;gt;&lt;br /&gt;4  &amp;lt;mbean code="org.jboss.internal.soa.esb.dependencies.DatabaseInitializer"&lt;br /&gt;5      name="jboss.esb:service=JmsTransactedDatabaseInitializer"&amp;gt;&lt;br /&gt;6     &amp;lt;attribute name="Datasource"&amp;gt;java:/JmsTransactedDB&amp;lt;/attribute&amp;gt;&lt;br /&gt;7     &amp;lt;attribute name="ExistsSql"&amp;gt;select * from jms_transacted_table&amp;lt;/attribute&amp;gt;&lt;br /&gt;8     &amp;lt;attribute name="SqlFiles"&amp;gt;&lt;br /&gt;9       hsqldb/create.sql&lt;br /&gt;10    &amp;lt;/attribute&amp;gt;&lt;br /&gt;11   &amp;lt;depends&amp;gt;jboss.jca:name=JmsTransactedDB,service=DataSourceBinding&amp;lt;/depends&amp;gt;&lt;br /&gt;12  &amp;lt;/mbean&amp;gt;&lt;br /&gt;13 &amp;lt;/server&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;There are (3) interesting things in this file:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;  Line 4 - This MBean creates the database on startup. How does it connect to the database? See line 6.&lt;/li&gt;&lt;li&gt;  Line 6 - Here's a reference to our datasource. Note the JNDI name that we observed in the datasource definition file. How does the DatabaseInitializer know what the database schema look like? See line 9.&lt;/li&gt;&lt;li&gt;  Line 9 - Here's a reference to the quickstart's src/hsqldb/create.sql file. This file create a very simple table in our database for the quickstart to use:&lt;/li&gt;&lt;/ul&gt;In file: src/hsqldb/create.sql:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;create table jms_transacted_table&lt;br /&gt;(&lt;br /&gt;unique_id INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,&lt;br /&gt;data_column VARCHAR(255) NOT NULL&lt;br /&gt;);&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;What else does the quickstart's database need? The service that creates the database (JmsTransactedDatabaseInitializer) has to be deployed. This is handled in the deployment.xml file (as are the JBoss Messaging queues that the quickstart will use):&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;&amp;lt;jbossesb-deployment&amp;gt;&lt;br /&gt;&amp;lt;depends&amp;gt;jboss.esb.quickstart.destination:service=Queue,name=quickstart_jms_transacted_Request_esb&amp;lt;/depends&amp;gt;&lt;br /&gt;&amp;lt;depends&amp;gt;jboss.esb.quickstart.destination:service=Queue,name=quickstart_jms_transacted_Request_gw&amp;lt;/depends&amp;gt;&lt;br /&gt;&amp;lt;depends&amp;gt;jboss.esb:service=JmsTransactedDatabaseInitializer&amp;lt;/depends&amp;gt;&lt;br /&gt;&amp;lt;/jbossesb-deployment&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;And finally, the jbossesb-service.xml quickstart-ds.xml files have to be included in the quickstart's .esb application archive file. This is handled by the "additional.deploys" property in the quickstart's build.xml file and the ../conf/base-build.xml file that is used by all the quickstarts.&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;cat -n build.xml | grep quick&lt;br /&gt;&amp;lt;property name="additional.deploys" value="jbossesb-service.xml quickstart-ds.xml" /&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;OK, that takes care of the database. Now, let's look at how we configure the quickstart to take advantage of the transaction support on the JBossESB in the SOA Platform. As always, the place to begin is the jboss-esb.xml file.&lt;br /&gt;&lt;br /&gt;In file: jboss-esb.xml&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;1  &amp;lt;?xml version = "1.0" encoding = "UTF-8"?&amp;gt;&lt;br /&gt;2  &amp;lt;jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" parameterReloadSecs="5"&amp;gt;&lt;br /&gt;3  &lt;br /&gt;4   &amp;lt;providers&amp;gt;&lt;br /&gt;5     &amp;lt;jms-jca-provider name="JBossMessaging" connection-factory="XAConnectionFactory"&amp;gt;&lt;br /&gt;6&lt;br /&gt;7       &amp;lt;jms-bus busid="quickstartGwChannel"&amp;gt;&lt;br /&gt;8         &amp;lt;jms-message-filter&lt;br /&gt;9           dest-type="QUEUE"&lt;br /&gt;10          dest-name="queue/quickstart_jms_transacted_Request_gw"&lt;br /&gt;11          transacted="true"&lt;br /&gt;12      /&amp;gt;&lt;br /&gt;13      &amp;lt;/jms-bus&amp;gt;&lt;br /&gt;14      &amp;lt;jms-bus busid="quickstartEsbChannel"&amp;gt;&lt;br /&gt;15        &amp;lt;jms-message-filter&lt;br /&gt;16          dest-type="QUEUE"&lt;br /&gt;17          dest-name="queue/quickstart_jms_transacted_Request_esb"&lt;br /&gt;18          transacted="true"&lt;br /&gt;19      /&amp;gt;&lt;br /&gt;20      &amp;lt;/jms-bus&amp;gt;&lt;br /&gt;21      &amp;lt;activation-config&amp;gt;&lt;br /&gt;22        &amp;lt;!-- The maximum number of times a message is redelivered before it is sent to the DLQ --&amp;gt;&lt;br /&gt;23        &amp;lt;property name="dLQMaxResent" value="5"/&amp;gt;&lt;br /&gt;24      &amp;lt;/activation-config&amp;gt;&lt;br /&gt;25&lt;br /&gt;26    &amp;lt;/jms-jca-provider&amp;gt;&lt;br /&gt;27  &amp;lt;/providers&amp;gt;&lt;br /&gt;28&lt;br /&gt;29  &amp;lt;services&amp;gt;&lt;br /&gt;30    &amp;lt;service&lt;br /&gt;31      category="JMSSecuredESB"&lt;br /&gt;32      name="SimpleListener"&lt;br /&gt;33      description="JMS Secured quickstart sample"&amp;gt;&lt;br /&gt;34      &amp;lt;listeners&amp;gt;&lt;br /&gt;35        &amp;lt;jms-listener name="JMS-Gateway"&lt;br /&gt;36          busidref="quickstartGwChannel"&lt;br /&gt;37          is-gateway="true"/&amp;gt;&lt;br /&gt;38        &amp;lt;jms-listener name="jmssecured"&lt;br /&gt;39          busidref="quickstartEsbChannel"/&amp;gt;&lt;br /&gt;40      &amp;lt;/listeners&amp;gt;&lt;br /&gt;41      &amp;lt;actions mep="OneWay"&amp;gt;&lt;br /&gt;42&lt;br /&gt;43        &amp;lt;action name="printMessage" class="org.jboss.soa.esb.actions.SystemPrintln"&amp;gt;&lt;br /&gt;44          &amp;lt;property name="message" value="JMS Transacted Quickstart entered. Message body"/&amp;gt;&lt;br /&gt;45          &amp;lt;property name="printfull" value="false"/&amp;gt;&lt;br /&gt;46        &amp;lt;/action&amp;gt;&lt;br /&gt;47&lt;br /&gt;48        &amp;lt;action name="insertDBAction" class="org.jboss.soa.esb.samples.quickstart.jmstransacted.test.DBInsertAction"&amp;gt;&lt;br /&gt;49          &amp;lt;property name="datasource-name" value="java:JmsTransactedDB"/&amp;gt;&lt;br /&gt;50          &amp;lt;property name="db-insert-sql" value="insert into jms_transacted_table(data_column) values(?)"/&amp;gt;&lt;br /&gt;51        &amp;lt;/action&amp;gt;&lt;br /&gt;52&lt;br /&gt;53        &amp;lt;!--&lt;br /&gt;54          Will throw an Exception for the configured number of rollbacks. This should trigger the transaction to be&lt;br /&gt;55          rolledback and the message placed back onto the JMS queue.&lt;br /&gt;56        --&amp;gt;&lt;br /&gt;57        &amp;lt;action name="throwExceptionAction" class="org.jboss.soa.esb.samples.quickstart.jmstransacted.test.ThrowExceptionAction"&amp;gt;&lt;br /&gt;58          &amp;lt;property name="rollbacks" value="5"/&amp;gt; &amp;lt;!-- if greater than dLQMaxResent then message goes to the JMS DLQ --&amp;gt;&lt;br /&gt;59        &amp;lt;/action&amp;gt;&lt;br /&gt;60&lt;br /&gt;61        &amp;lt;action name="printMessageDone" class="org.jboss.soa.esb.actions.SystemPrintln"&amp;gt;&lt;br /&gt;62          &amp;lt;property name="message" value="JMS Transacted Quickstart processed successfully. Message body"/&amp;gt;&lt;br /&gt;63          &amp;lt;property name="printfull" value="false"/&amp;gt;&lt;br /&gt;64        &amp;lt;/action&amp;gt;&lt;br /&gt;65&lt;br /&gt;66        &amp;lt;!-- The next action is for Continuous Integration testing --&amp;gt;&lt;br /&gt;67        &amp;lt;action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile"/&amp;gt;&lt;br /&gt;68      &amp;lt;/actions&amp;gt;&lt;br /&gt;69    &amp;lt;/service&amp;gt;&lt;br /&gt;70  &amp;lt;/services&amp;gt;&lt;br /&gt;71&lt;br /&gt;72  &amp;lt;/jbossesb&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;&lt;li&gt;  Line 2 - Before we go any further, we should look at the XSD (XML schema definition) for jboss-esb.xml files. The schema definition is available here:  http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd. If you're going to be working with the SOA Platform, it's a good idea to become familiar with this XSD as all the elements that you work with in jboss-esb.xml are defined there. The two main elements are of course, providers and services.  Let's look at the providers first. Two types of providers are supported. Schedule providers define schedule driven listeners that pull messages from queues at (you guessed it) scheduled time periods. In contrast, bus providers such as the jms-jca-providers that we're using in this quickstart, are associated with listeners that have messages pushed to them. &lt;a href="#[7]"&gt;[7]&lt;/a&gt;&lt;/li&gt;&lt;li&gt;  Line 5 - Here's the start of our jms-jca-provider. Note that the XAConnectionFactory provides support for distributed transactions&lt;br /&gt;&lt;/li&gt;&lt;li&gt;  Lines 7-13 - This is a reference to the channel and JMS queue that will be used when a JMS message that is sent to a JMS gateway to initiate the quickstart. Let's stop for a second and talk about the forms in which data is moved onto and across the JBossESB in the SOA Platform. One of the primary functions performed by JBossESB is the routing of messages between services. (I said it before, and I'll say it again; remember that, on an ESB, everything is either a message or a service.) The messages that JBoss ESB handles conform to org.jboss.soa.esb.message.Message. Service endpoints that can process messages in this format are described as being "ESB-aware." This is all well and good for services and applications that were designed and written with this message format in mind, but what about other services, including legacy applications, that communicate through other non-ESB aware data formats? JBossESB handles connecting services that communicate in non-ESB aware message formats through its gateway listeners. These listeners route incoming messages from outside the ESB to ESB services. The ESB's set of gateway listeners (generally referred to as "gateways") support a variety of message formats such as files, FTP, and JMS. These gateways accept messages in a non-ESB aware format onto the ESB and then convert them (actually, they wrap the message payload) into ESB-aware messages before sending them to their service's action pipeline.&lt;/li&gt;&lt;li&gt;  Line 11 - Remember, we want the service to process messages within a transaction.&lt;/li&gt;&lt;li&gt;  Lines 14-20 - Gateways are intended to enable the JBossESB to communicate to external data sources. The gateways themselves don't move data across the ESB. Accordingly, for each Gateway channel that we define, we have to define a corresponding ESB-aware channel to be used to route messages within the ESB.&lt;/li&gt;&lt;li&gt;  Line 21 - The activation-config defines how we link to the JCA. In the case of this quickstart, the interesting property is:  dLQMaxResent. As the comment indicates, the “DLQMaxResent” controls how many times the JCA adapter resends the message before it is sent to the dead letter queue. This is a JBossESB service that handles messages for transports when the messages cannot be delivered. (The JMS transport actually has its own dead letter queue as JBoss Messaging is shipped with a set of pre-configured destinations defined in destinations-service.xml including: &amp;lt;mbean code="org.jboss.jms.server.destination.Queue" name="jboss.messaging.destination:service=Queue,name=DLQ") In this quickstart, the JCA adapter will try to send the message 5 times.&lt;/li&gt;&lt;/ul&gt;After our providers are defined, we can define our services.&lt;br /&gt;&lt;br /&gt;A service is where thing happen. Each service definition includes a set of listeners and a sequential set of actions referred to as an "action pipeline." The listeners "listen" for incoming messages for the service and route those messages to the action pipeline.&lt;br /&gt;&lt;br /&gt;After the service name and category are defined on lines 31 and 32, we define the service's listeners:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;  Lines 35-37 - Here's the JMS gateway listener definition. Notice how it references the bus ID of the channel that we defined in earlier in the provider definition. Also, notice how it's "is-gateway" property is set to true to indicate that this listener is a gateway.&lt;/li&gt;&lt;li&gt;  Lines 38-39 - And here is the ESB-aware listener that corresponds to the gateway listener.&lt;/li&gt;&lt;/ul&gt;So much for the listeners, now let's look at the actions.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;  Line 41 - This is the start of the definitions of the sequence of actions that we referred to as the action pipeline. The message exchange pattern (or "mep") indicates that the messages are not being exchanged in a request/response pattern, but rather are being sent in only one direction. (In contrast, web services exposed on the ESB would follow a synchronous request/response pattern.)&lt;/li&gt;&lt;li&gt;  Lines 43-46 - This action invokes the simplest of the JBossESB's many useful out-of-the-box actions (http://soa.dzone.com/articles/works-great-right-out-box) to write some messages to the server log.&lt;/li&gt;&lt;li&gt;  Lines 48-51 - Here's where things start to get interesting. This custom action writes a row to our database table. Remember the "java:JmsTransactedDBdatasource" that we defined? Here's where gets used.&lt;/li&gt;&lt;li&gt;  Line 57 - Remember how we talked about how to cause a rollback of a transaction in the action pipeline to occur? We configured the .esb to include a transaction, and now we raise a RuntimeException in the action pipeline. The action defined here raises an exception of a type that we define in the org.jboss.soa.esb.samples.quickstart.jmstransacted.test.ThrowExceptionAction class. The ActionProcessingPipeline will catch the exception and pass it up the stack to its caller, the JMS/JCA adapter. The Adapter then causes the transaction to rollback and the message is redelivered.&lt;/li&gt;&lt;li&gt;  Line 58 - When we defined the jms-jca-provider's activation-config, we specified a dLQMaxResent value of 5 to indicate that if the transaction was rolled back more than 5 times, the message processed in the transaction should be sent to the JMS dead letter queue. In line 58, we also set the value of the rollbacks property equal to 5, to ensure that the transaction can complete after 5 rollbacks, and the message is not sent to the dead letter queue service. As the comment helpfully explains, setting the rollbacks property to be greater than dLQMaxResent will send the message to the dead letter queue service.&lt;/li&gt;&lt;li&gt;  Lines 61-64  This action is only reached after the rollbacks have been performed and the transaction is able to complete. The action writes the message body to the server log.&lt;/li&gt;&lt;/ul&gt;Yogi Berra once said that "In theory there is no difference between theory and practice. In practice there is."&lt;a href="#[8]"&gt;[8]&lt;/a&gt; OK. Enough theory, let's run the quickstart and watch what happens.&lt;br /&gt;&lt;br /&gt;After the SOA-P server is started, the quickstart, is deployed with this command:  ant deploy&lt;br /&gt;&lt;br /&gt;When the quickstart is deployed, the following is to the server.log:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;2010-04-07 09:26:22,117 INFO  [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] (HDScanner) Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=JmsTransactedDB' to JNDI name 'java:JmsTransactedDB'&lt;br /&gt;2010-04-07 09:26:22,157 INFO  [org.jboss.internal.soa.esb.dependencies.DatabaseInitializer] (HDScanner) Initializing java:/JmsTransactedDB from listed sql files&lt;br /&gt;2010-04-07 09:26:22,326 INFO  [org.jboss.soa.esb.listeners.deployers.mc.EsbDeployment] (HDScanner) Starting ESB Deployment 'Quickstart_JMS_Transacted.esb'&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Note how the JmsTransactedDB database is initialized by org.jboss.internal.soa.esb.dependencies.DatabaseInitializer class the when the quickstart is deployed.&lt;br /&gt;&lt;br /&gt;Next, we run the quickstart with this command: ant runtest&lt;br /&gt;&lt;br /&gt;When the ant runtest target is executed, the following chain reaction is started:&lt;br /&gt;&lt;br /&gt;The org.jboss.soa.esb.samples.quickstart.jmstransacted.test.SendJMSMessage class sends a (non-ESB aware) JMS message to the quickstart_jms_transacted_Request_gw queue. The message is routed through that queue's corresponding ESB-aware queue (quickstart_jms_transacted_Request_esb) to the SimpleListener service and the action pipeline is initiated.&lt;br /&gt;&lt;br /&gt;The first time that the action pipeline is started, the org.jboss.soa.esb.samples.quickstart.jmstransacted.test.DBInsertAction class inserts a row into the database through the HSQLDB datasource. This results in the following messages being written to the server.log:&lt;br /&gt;&lt;br /&gt;Then, the org.jboss.soa.esb.samples.quickstart.jmstransacted.test.ThrowExceptionAction runtime exception is thrown.&lt;br /&gt;&lt;br /&gt;Since this exception is thrown from inside the action pipeline, the JMS/JCA adapter rolls back the enclosing transaction. The exception is propagated to the JMS/JCA adapter as the exception is passed up the stack from the action pipeline to its the caller (which is the adapter). The exception is caught by the JBossESB's org.jboss.soa.esb.listeners.message.ActionProcessingPipeline, and is propagated up the stack to the JMS/JCA adapter (which is the action pipeline's caller). The adapter causes the transaction to rollback. This results in the row being removed from the database and in the original message being redelivered. Remember what we said about a transaction being an "all or nothing" event?&lt;br /&gt;&lt;br /&gt;The transaction/rollback sequence then repeats until the configured number of rollbacks are performed. You can see a counter (maintained by the org.jboss.soa.esb.samples.quickstart.jmstransacted.test.DBInsertAction class) of the number of times the action is attempted.&lt;br /&gt;&lt;br /&gt;The printMessage action prints the message to the log:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;2010-04-07 09:26:35,340 INFO  [STDOUT] (WorkManager(2)-9) JMS Transacted Quickstart entered. Message body:&lt;br /&gt;2010-04-07 09:26:35,340 INFO  [STDOUT] (WorkManager(2)-9) [Hello Transacted JMS World]].&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;And the insertDBAction action writes the row to the database - note the counter value of [1]:&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;2010-04-07 09:26:35,415 INFO  [org.jboss.soa.esb.samples.quickstart.jmstransacted.test.DBInsertAction] (WorkManager(2)-9) Successfully inserted [Hello Transacted JMS World] counter[1]] into jms_transacted_table&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;But wait! Then our exception is raised:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;2010-04-07 09:26:35,488 ERROR [org.jboss.resource.adapter.jms.inflow.JmsServerSession] (WorkManager(2)-9) Unexpected error delivering message delegator-&amp;gt;JBossMessage[5204569273565185]:PERSISTENT, deliveryId=0&lt;br /&gt;java.lang.IllegalStateException: [Throwing Exception to trigger a transaction rollback]&lt;br /&gt;at org.jboss.soa.esb.samples.quickstart.jmstransacted.test.ThrowExceptionAction.process(ThrowExceptionAction.java:75)&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;The JMS/JCA adapter rolls back the transaction, and the message is delivered again, and another row is written to the database. The counter is incremented to [2] this time and the exception is raised again.&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;2010-04-07 09:26:36,435 INFO  [STDOUT] (WorkManager(2)-10) JMS Transacted Quickstart entered. Message body:&lt;br /&gt;2010-04-07 09:26:36,435 INFO  [STDOUT] (WorkManager(2)-10) [Hello Transacted JMS World]].&lt;br /&gt;2010-04-07 09:26:36,438 INFO  [org.jboss.soa.esb.samples.quickstart.jmstransacted.test.DBInsertAction] (WorkManager(2)-10) Successfully inserted [Hello Transacted JMS World] counter[2]] into jms_transacted_table&lt;br /&gt;2010-04-07 09:26:36,442 ERROR [org.jboss.resource.adapter.jms.inflow.JmsServerSession] (WorkManager(2)-10) Unexpected error delivering message delegator-&amp;gt;JBossMessage[5204569273565185]:PERSISTENT, deliveryId=1&lt;br /&gt;java.lang.IllegalStateException: [Throwing Exception to trigger a transaction rollback]&lt;br /&gt;at org.jboss.soa.esb.samples.quickstart.jmstransacted.test.ThrowExceptionAction.process(ThrowExceptionAction.java:75)&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;When the rollback counter number is reached, the action pipeline completes and the transaction commits so that the row is finally written to the database. The following messages are written to the servler.log - This sequence repeats (5) times until the counter is passed and the row is actually written to the database:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;2010-04-07 09:26:40,489 INFO  [STDOUT] (WorkManager(2)-14) JMS Transacted Quickstart entered. Message body:&lt;br /&gt;2010-04-07 09:26:40,489 INFO  [STDOUT] (WorkManager(2)-14) [Hello Transacted JMS World]].&lt;br /&gt;2010-04-07 09:26:40,490 INFO  [org.jboss.soa.esb.samples.quickstart.jmstransacted.test.DBInsertAction] (WorkManager(2)-14) Successfully inserted [Hello Transacted JMS World] counter[6]] into jms_transacted_table&lt;br /&gt;2010-04-07 09:26:40,490 INFO  [STDOUT] (WorkManager(2)-14) JMS Transacted Quickstart processed successfully. Message body:&lt;br /&gt;2010-04-07 09:26:40,490 INFO  [STDOUT] (WorkManager(2)-14) [Hello Transacted JMS World]].&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Now, as I mentioned in the beginning of this post, I work as a software QE engineer. One of the basic tenents of software QE is to never trust anything. Let's take a closer look at what happens when the quickstart runs.&lt;br /&gt;&lt;br /&gt;Server logs are goldmines for gathering debugging information. Let's restart the server, but this time set the server logging level to DEBUG:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;./run.sh -Djboss.server.log.threshold=DEBUG&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;And then rerun the quickstart. The server.log will be much more verbose this time, but if you look closely, you can see the rollback counter in action:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;grep  nr-of-rollbacks server.log&lt;br /&gt;2010-04-07 23:14:19,776 DEBUG [org.jboss.soa.esb.samples.quickstart.jmstransacted.test.ThrowExceptionAction] (WorkManager(2)-11) rollbackCounter [0], nr-of-rollbacks [5]&lt;br /&gt;2010-04-07 23:14:20,804 DEBUG [org.jboss.soa.esb.samples.quickstart.jmstransacted.test.ThrowExceptionAction] (WorkManager(2)-12) rollbackCounter [1], nr-of-rollbacks [5]&lt;br /&gt;2010-04-07 23:14:21,819 DEBUG [org.jboss.soa.esb.samples.quickstart.jmstransacted.test.ThrowExceptionAction] (WorkManager(2)-13) rollbackCounter [2], nr-of-rollbacks [5]&lt;br /&gt;2010-04-07 23:14:22,833 DEBUG [org.jboss.soa.esb.samples.quickstart.jmstransacted.test.ThrowExceptionAction] (WorkManager(2)-14) rollbackCounter [3], nr-of-rollbacks [5]&lt;br /&gt;2010-04-07 23:14:23,848 DEBUG [org.jboss.soa.esb.samples.quickstart.jmstransacted.test.ThrowExceptionAction] (WorkManager(2)-15) rollbackCounter [4], nr-of-rollbacks [5]&lt;br /&gt;2010-04-07 23:14:24,858 DEBUG [org.jboss.soa.esb.samples.quickstart.jmstransacted.test.ThrowExceptionAction] (WorkManager(2)-16) rollbackCounter [5], nr-of-rollbacks [5]&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Before we move on, let's look at one more thing and verify that only one row is actually written to the database. Now, the quickstart is very tidy and always cleans up after itself by removing rows from the database. Let's disable this cleanup by removing this target from the quickstart's build.xml file:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(204, 204, 204); padding: 0px; background: rgb(240, 240, 240) url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) repeat scroll 0% 0%; overflow: auto; font-family: arial; font-size: 12px; width: 99%; height: auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: rgb(0, 0, 0); text-align: left; line-height: 20px;"&gt;&lt;code style="color: rgb(0, 0, 0);"&gt;cat build.xml | grep truncate&lt;br /&gt;    &lt;target name="truncate" depends="dependencies, db.lib.dir"&gt;&lt;/target&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;And, let's start the server again, but with one additional command line option: sh ./run.sh -Djava.awt.headless=false&lt;br /&gt;&lt;br /&gt;Why "headless=false?" After we run the quickstart again, the row that was written to the database should still be there. We'll look at it with the HSQL DB Manager service. This service requires the server to not be started in its default "headless" mode, as the service opens up a Java UI application. We invoke the DB Manager from the JMX console - see screenshot - the service tag is: database=jbossesb,service=Hypersonic.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_Wad47xG7w3A/S8MQI_Pa4ZI/AAAAAAAABT0/ZNRJKQgAVsI/s1600/screen1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 322px;" src="http://3.bp.blogspot.com/_Wad47xG7w3A/S8MQI_Pa4ZI/AAAAAAAABT0/ZNRJKQgAVsI/s400/screen1.jpg" alt="" id="BLOGGER_PHOTO_ID_5459224919904280978" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Once the DM Manager application UI launches, we just connect to the "JmsTransactedDB" database - see screenshot - and execute a query to return all rows in the "jms_transacted_table" - see screenshot.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_Wad47xG7w3A/S8ManSOSm9I/AAAAAAAABT8/TP3AFdiemVE/s1600/screen2.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 194px;" src="http://1.bp.blogspot.com/_Wad47xG7w3A/S8ManSOSm9I/AAAAAAAABT8/TP3AFdiemVE/s400/screen2.jpg" alt="" id="BLOGGER_PHOTO_ID_5459236435512171474" border="0" /&gt;&lt;/a&gt;And, there is our one record!&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_Wad47xG7w3A/S8Ma16IPLII/AAAAAAAABUE/hgUrzP090k0/s1600/screen3.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 191px;" src="http://4.bp.blogspot.com/_Wad47xG7w3A/S8Ma16IPLII/AAAAAAAABUE/hgUrzP090k0/s400/screen3.jpg" alt="" id="BLOGGER_PHOTO_ID_5459236686742367362" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Before we move on, it's worthwhile to note what we did NOT have to do to execute a transaction with the SOA Platform.&lt;br /&gt;&lt;br /&gt;We did not have to write transaction specific code. The JBossESB in the Platform did the dirty work for us. All we had to do is to define the .esb application's configuration in its jboss-esb.xml file to include the transaction-relevant properties and reference a JMS/JCA adapter and the Platform did the rest. This is what makes middleware so useful. You could write the code to handle transactions all on your own, but wouldn't you rather concentrate on solving your own business problems instead of build infrastucture plumbing? &lt;a href="#[9]"&gt;[9]&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;Closing Thoughts&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The value that using transactions adds to an application is pretty obvious (just keep your bank account in mind). The value added by middleware in implementing transactions should also be obvious. You could write your own code to handle atomicity, consistency, isolation and durability, but, this would not be an easy task, and it would also take away a lot of time from your being able to concentrate on solving your own business logic problems. The SOA Platform's support for transactions over the JBossESB enables you to provide a higher level of reliability and durablity to your service based applications.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;References&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="[1]"&gt;&lt;/a&gt;[1] &lt;a href="http://qconlondon.com/london-2010/file?path=/qcon-london-2010/slides/MarkLittle_TransactionsOverUsedOrJustMisunderstood.pdf"&gt;http://qconlondon.com/london-2010/file?path=/qcon-london-2010/slides/MarkLittle_TransactionsOverUsedOrJustMisunderstood.pdf&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="[2]"&gt;&lt;/a&gt;[2] &lt;a href="http://www.blogger.com/Little,%20Mark,%20Maron,%20Jon,%20Pavlik,%20Greg.%20Transaction%20Processing:%20Design%20and%20Implementation,%20Upper%20Saddle%20RIver,%20new%20Jersey:%20Prentice%20Hall/Hewlett-Packard%20Professional%20Books,%202004."&gt;Little, Mark, Maron, Jon, Pavlik, Greg. Transaction Processing: Design and Implementation, Upper Saddle RIver, new Jersey: Prentice Hall/Hewlett-Packard Professional Books, 2004.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="[3]"&gt;&lt;/a&gt;[3] &lt;a href="http://www.redhat.com/docs/en-US/JBoss_SOA_Platform/5.0.0/html-single/Programmers_Guide/index.html#sect-SOA_ESB_Programmers_Guide-What_is_a_Service-InVM_Transport"&gt;http://www.redhat.com/docs/en-US/JBoss_SOA_Platform/5.0.0/html-single/Programmers_Guide/index.html#sect-SOA_ESB_Programmers_Guide-What_is_a_Service-InVM_Transport&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="[4]"&gt;&lt;/a&gt;[4] &lt;a href="http://java.sun.com/j2ee/connector/"&gt;http://java.sun.com/j2ee/connector/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="[5]"&gt;&lt;/a&gt;[5] &lt;a href="http://java.sun.com/javaee/technologies/jta/index.jsp"&gt;http://java.sun.com/javaee/technologies/jta/index.jsp&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="[6]"&gt;&lt;/a&gt;[6] &lt;a href="http://www.jboss.org/file-access/default/members/jbossas/freezone/docs/Server_Configuration_Guide/4/html/Connectors_on_JBoss-Configuring_JDBC_DataSources.html"&gt;http://www.jboss.org/file-access/default/members/jbossas/freezone/docs/Server_Configuration_Guide/4/html/Connectors_on_JBoss-Configuring_JDBC_DataSources.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="[7]"&gt;&lt;/a&gt;[7] &lt;a href="http://www.redhat.com/docs/en-US/JBoss_SOA_Platform/5.0.0/html-single/Programmers_Guide/index.html#sect-SOA_ESB_Programmers_Guide-Configuration-Providers"&gt;http://www.redhat.com/docs/en-US/JBoss_SOA_Platform/5.0.0/html-single/Programmers_Guide/index.html#sect-SOA_ESB_Programmers_Guide-Configuration-Providers&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="[8]"&gt;&lt;/a&gt;[8] &lt;a href="http://en.wikiquote.org/wiki/Yogi_Berra"&gt;http://en.wikiquote.org/wiki/Yogi_Berra&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="[9]"&gt;&lt;/a&gt;[9] &lt;a href="http://magazine.redhat.com/2008/03/11/what-is-middleware-in-plain-english-please"&gt;http://magazine.redhat.com/2008/03/11/what-is-middleware-in-plain-english-please&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;Acknowledgments&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;As always, I want to thank the JBoss SOA Platform team and community (especially Kevin Conner for his timely review input for this blog post).&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9094589327053503491-7349855009782117187?l=jboss-soa-p.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jboss-soa-p.blogspot.com/feeds/7349855009782117187/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9094589327053503491&amp;postID=7349855009782117187' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/7349855009782117187'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/7349855009782117187'/><link rel='alternate' type='text/html' href='http://jboss-soa-p.blogspot.com/2010/04/jms-transactions-and-soa-platform.html' title='JMS Transactions and the SOA Platform'/><author><name>Len DiMaggio</name><uri>http://www.blogger.com/profile/07124585546929851174</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='20' src='http://1.bp.blogspot.com/_Wad47xG7w3A/Sc7b75epEEI/AAAAAAAAAQ4/F9-h0znUI7w/S220/Boston.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_Wad47xG7w3A/S8MQI_Pa4ZI/AAAAAAAABT0/ZNRJKQgAVsI/s72-c/screen1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9094589327053503491.post-2990189597528822545</id><published>2010-03-26T04:51:00.000-07:00</published><updated>2010-03-26T04:53:12.907-07:00</updated><title type='text'>SOA and Cloud</title><content type='html'>&lt;a href="http://markclittle.blogspot.com/2009/01/soa-is-dead-again.html"&gt;I may not agree with Anne that SOA is dead&lt;/a&gt;, but &lt;a href="http://apsblog.burtongroup.com/2010/03/cloud-computing-and-the-sword-soa.html"&gt;she's spot on with this analysis&lt;/a&gt;!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9094589327053503491-2990189597528822545?l=jboss-soa-p.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jboss-soa-p.blogspot.com/feeds/2990189597528822545/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9094589327053503491&amp;postID=2990189597528822545' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/2990189597528822545'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/2990189597528822545'/><link rel='alternate' type='text/html' href='http://jboss-soa-p.blogspot.com/2010/03/soa-and-cloud.html' title='SOA and Cloud'/><author><name>Mark Little</name><uri>http://www.blogger.com/profile/15072917010265365428</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9094589327053503491.post-6373379415556375074</id><published>2010-03-22T09:11:00.000-07:00</published><updated>2010-03-22T09:18:38.820-07:00</updated><title type='text'>SOA Platform 5.0 Announced</title><content type='html'>Big news today!&lt;br /&gt;&lt;br /&gt;JBoss Enterprise SOA Platform v5.0 and JBoss Developer Studio V3.0 were formally announced today. This major release of the SOA Platform is built on JBoss Enterprise Application Platform v5 and provides multiple development productivity and management enhancements including new management consoles, updates to the enterprise services bus to support a new XSLT transformation tool, easier content based routing, enhanced protocol listeners, better web services integration, a new rules engine that can be managed by JBoss Enterprise BRMS (business rules management system), enhanced registry (UDDI v3). JBoss Developer Studio V3.0 is built on the latest major release of Eclipse 3.5 and includes enhancements to make it easier to create SOA services and data transformations.&lt;br /&gt;&lt;br /&gt;The press release is here - http://www.redhat.com/about/news/prarchive/2010/soa-enhanced.html&lt;br /&gt;&lt;br /&gt;And, Pierre Fricke has written a blog post on the SOA Platform release  here:  http://blogs.jboss.org/blog/pfricke/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9094589327053503491-6373379415556375074?l=jboss-soa-p.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jboss-soa-p.blogspot.com/feeds/6373379415556375074/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9094589327053503491&amp;postID=6373379415556375074' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/6373379415556375074'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/6373379415556375074'/><link rel='alternate' type='text/html' href='http://jboss-soa-p.blogspot.com/2010/03/soa-platform-50-announced.html' title='SOA Platform 5.0 Announced'/><author><name>Len DiMaggio</name><uri>http://www.blogger.com/profile/07124585546929851174</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='20' src='http://1.bp.blogspot.com/_Wad47xG7w3A/Sc7b75epEEI/AAAAAAAAAQ4/F9-h0znUI7w/S220/Boston.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9094589327053503491.post-7007887766466220787</id><published>2009-09-16T18:29:00.001-07:00</published><updated>2009-09-16T18:30:19.803-07:00</updated><title type='text'>Out-of-the box actions post picked up by DZone...</title><content type='html'>Here it is:&lt;br /&gt;&lt;br /&gt;   &lt;a href="http://soa.dzone.com/articles/works-great-right-out-box"&gt;http://soa.dzone.com/articles/works-great-right-out-box&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9094589327053503491-7007887766466220787?l=jboss-soa-p.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jboss-soa-p.blogspot.com/feeds/7007887766466220787/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9094589327053503491&amp;postID=7007887766466220787' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/7007887766466220787'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/7007887766466220787'/><link rel='alternate' type='text/html' href='http://jboss-soa-p.blogspot.com/2009/09/out-of-box-actions-post-picked-up-by.html' title='Out-of-the box actions post picked up by DZone...'/><author><name>Len DiMaggio</name><uri>http://www.blogger.com/profile/07124585546929851174</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='20' src='http://1.bp.blogspot.com/_Wad47xG7w3A/Sc7b75epEEI/AAAAAAAAAQ4/F9-h0znUI7w/S220/Boston.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9094589327053503491.post-5976428464282862633</id><published>2009-09-14T16:43:00.000-07:00</published><updated>2009-09-14T20:02:22.138-07:00</updated><title type='text'>Works Great Right Out of the Box</title><content type='html'>In reviewing my last two posts to this blog, I realized that I've actually been describing several of the SOA Platforms out-of-the-box actions in an ad hoc manner. I thought that this might be a good time to take a step back and review the platform's full set of out of the box actions.&lt;br /&gt;&lt;br /&gt;Which got me thinking about how useful it is when a tool works "right of of the box" and how disappointing it can be when it doesn't.&lt;br /&gt;&lt;br /&gt;In his book "Diary of a Wimpy Kid, The Last Straw,"&lt;a href="http://www.blogger.com/post-create.g?blogID=9094589327053503491#%5B1%5D"&gt;[1]&lt;/a&gt; author Jeff Kinney has the main character, angst-ridden middle school student Greg Heffley, finds an ad for "personal hovercraft" in a comic book. Greg imagines himself as the coolest kid in school if he could get his own hovercraft, so he sends all his saved-up money away for one. He is, of course, disappointed when he opens the box and finds not a functioning personal hovercraft, but the plan to build one.&lt;br /&gt;&lt;br /&gt;Step one in the plan reads: "Acquire an industrial twin-turbine engine."&lt;br /&gt;&lt;br /&gt;In contrast, the SOA Platform provides an extensive set of actions&lt;a href="http://www.blogger.com/post-create.g?blogID=9094589327053503491#%5B2%5D"&gt;[2]&lt;/a&gt; that work right out of the box. The SOA Platform also supports the creation of custom actions, but, when you are designing how your application will make use of the Platform, the place to start is the out-of-the-box actions. These have all been tested so you can depend on the results they will achieve, and they've also been documented and illustrated in the quickstart sample programs. (On a personal note, my introduction to the SOA Platform included my spending several hours building an action, when an out of the box action for the same task already existed!)&lt;br /&gt;&lt;br /&gt;The out-of-the-box actions implemented in the SOA Platform are divided into the following functional groups:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Transformers and Converters&lt;/b&gt; - converting message data from one form to another&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Business Process Management&lt;/b&gt; - integrating with JBoss jBPM&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Scripting&lt;/b&gt; - automating tasks in supported scripting languages&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Services&lt;/b&gt; - integration with EJBs&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Routing&lt;/b&gt; - moving message data to the correct services&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Notifier&lt;/b&gt; - sending data to ESB unaware destinations&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Webservices/SOAP&lt;/b&gt; - the name says it all - support for Webservices&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;(There's also a Miscellaneous group that includes only one action - org.jboss.soa.esb.actions.SystemPrintln. This action prints of a message.)&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_Wad47xG7w3A/Sq7VxhPB2vI/AAAAAAAAAyE/v-uG7h8BhkY/s1600-h/box_diagram.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 348px; height: 258px;" src="http://4.bp.blogspot.com/_Wad47xG7w3A/Sq7VxhPB2vI/AAAAAAAAAyE/v-uG7h8BhkY/s400/box_diagram.png" alt="" id="BLOGGER_PHOTO_ID_5381473651466033906" border="0" /&gt;&lt;/a&gt;Let's take a quick look at all of these actions, and then a more in-depth look at a couple of them.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Transformers and Converters&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;These actions are needed to enable services that expect data in different forms to communicate with each other. What transformers and converters do is to translate message payloads into different forms. Let's stop for a minute and review the contents of messages as they are passed over the JBossESB in the SOA Platform. Messages implement the org.jboss.soa.esb.message.Message interface. From the point of view of a service, the data in a message, in other words, the message "payload" consists of the message body plus attachments and properties. The default way for an action to get or set a message payload is the MessagePayloadProxy utility class. This class is important as it provides a standard way to get the message payload.&lt;br /&gt;&lt;br /&gt;The actions in the Transformers and Converters actions group (yes, the names are pretty self-explanatory) are:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;ByteArrayToString&lt;/b&gt; (org.jboss.soa.esb.actions.converters.ByteArrayToString) - This action converts a byte[] message payload into a Java String&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;LongToDateConverter&lt;/b&gt; (org.jboss.soa.esb.actions.converters.LongToDateConverter) - And this action converts a Java long message payload into a java.util.Date&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;ObjectInvoke&lt;/b&gt; (org.jboss.soa.esb.actions.converters.ObjectInvoke) - Things start to get a little more interesting with the ObjectInvoke converter. This action takes a serialized object, which constitutes the entire Message payload, and passes it to a configured processer class. The processed results become the new message payload. The action lets you use your own POJOs as the message payloads.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;ObjectToCSVString&lt;/b&gt; (org.jboss.soa.esb.actions.converters.ObjectToCSVString) - This action converts a message into a comma separated string based on a list of property names that you supply.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;ObjectToXStream&lt;/b&gt; (org.jboss.soa.esb.actions.converters.ObjectToXStream) - This action is similar to the ObjectInvoke action, except that it converts the object to XML using XStream&lt;a href="http://www.blogger.com/post-create.g?blogID=9094589327053503491#%5B3%5D"&gt;[3]&lt;/a&gt;. You've probably already guessed that the XStreamToObject action converts XML to an object using XStream.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;SmooksAction&lt;/b&gt; (org.jboss.soa.esb.smooks.SmooksAction) - This action enables you to use a powerful set of Smooks&lt;a href="http://www.blogger.com/post-create.g?blogID=9094589327053503491#%5B4%5D"&gt;[4]&lt;/a&gt; operations within the SOA Platform. Transformations are probably the first type of operation that you think of with Smooks, but with the SmooksAction you can also make use of Smooks operations such as splitting and routing message payloads&lt;a href="http://www.blogger.com/post-create.g?blogID=9094589327053503491#%5B5%5D"&gt;[5]&lt;/a&gt;. We'll take a closer look at this action later in the post. (Note that the SmooksTransformer action is being deprecated in favor of the SmooksAction action.)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;PersistAction&lt;/b&gt; (org.jboss.soa.esb.actions.MessagePersister) - This action doesn't really transform or convert a message, it writes it to the persistent message store. The most common use of the action is that it is how the SOA Platform itself writes messages to the dead letter queue (DLQ), but it can be used in any situation when you want to store a message.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;Business Process Management&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This action group contains only one out of the box action (org.jboss.soa.esb.services.jbpm.actions.BpmProcessor), but that one action supports the JBossESB - jBPM integration in the SOA Platform. This integration enables your services to make calls into a jBPM process through the jBPM Command API. Of the commands in the command API, the following (3) are available for use from ESB:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;NewProcessInstanceCommand&lt;/b&gt; creates a new ProcessInstance using a process definition that has already been deployed to jBPM. The process instance is left in the start state so that tasks referenced by start node are executed.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;StartProcessInstanceCommand&lt;/b&gt; is the same as NewProcessInstanceCommand, except that the process instance that is created is moved from the start position to the first node in the process graph.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;As its name implies, &lt;b&gt;CancelProcessInstanceCommand&lt;/b&gt; cancels a process instance.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;But, this is only part of the JBossESB - jBPM integration. The integration also supports the orchestration of services from jBPM processes. For a fuller description of the integration, see: &lt;a href="http://jboss-soa-p.blogspot.com/2009/06/hanging-together-on-soa-platform.html"&gt;http://jboss-soa-p.blogspot.com/2009/06/hanging-together-on-soa-platform.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Scripting&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This group of actions makes it possible for you to create custom actions using scripting languages. As of release 4.3 of the SOA Platform, scripting actions in Groovy and Bean Scripting Framework (BSF) are supported.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;GroovyActionProcessor&lt;/b&gt; (org.jboss.soa.esb.actions.scripting.GroovyActionProcessor) - which uses Groovyscripts&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;ScriptingAction&lt;/b&gt; (org.jboss.soa.esb.actions.scripting.ScriptingAction) - which uses the Bean Scripting Framework and supports BeanShell, Jython and JRuby scripts&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Both these actions accept the message payload and configuration data such as a Log4J logger as variables for the script that is executed by the action. In addition, they both support having scripting contained within the message itself.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Services&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;There's only one action in this group, but it's an important one.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The &lt;b&gt;EJBProcessor&lt;/b&gt; (org.jboss.soa.esb.actions.EJBProcessor) action accepts a message and uses it to locate and invoke an EJB. (The SOA Platform supports both EJB2 and EJB3 through this action.) In order to find the correct EJB and invoke the correct method, you specify information such as the jndi-name, initial-context-factory, provider-url, method name and and other configuration specific to the EJB as message properties&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;Routing&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;One of the major tasks that the JBoss ESB in the SOA Platform performs is the routing of messages to services. (Remember that in an ESB, everything is either a message or a service.) In an earlier post, I described how to use JBoss Rules to perform content based routing (CBR), where the content of an incoming message determines its routing. The full set of routing actions are:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Aggregator&lt;/b&gt; (org.jboss.soa.esb.actions.Aggregator) - This is an interesting one. The Aggregator, as its name indicates, aggregates information together. This action enables you to combine information from multiple messages into one message. The Aggregator action is an implementation of the Aggregator Enterprise Integration Pattern&lt;a href="http://www.blogger.com/post-create.g?blogID=9094589327053503491#%5B6%5D"&gt;[6]&lt;/a&gt;.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;EchoRouter&lt;/b&gt; (org.jboss.soa.esb.actions.routing.EchoRouter) - In contrast, the EchoRuter just logs and returns the incoming message.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;HttpRouter&lt;/b&gt; (org.jboss.soa.esb.actions.routing.HttpRouter) - The HttpRouter routes the incoming message to a URL that you specify in the action definition.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;JMSRouter&lt;/b&gt; (org.jboss.soa.esb.actions.routing.JMSRouter) - This action routes the incoming message to JMS. For example, to a JMS queue where a service can then retrieve the message asynchronously. In order to find the correct JMS queue or topic, you specify values for properties such as jndi-name, initial-context-factory, and jndi-URL in the action definition.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;ContentBasedRouter&lt;/b&gt; (org.jboss.soa.esb.actions.ContentBasedRouter) - I described content based routing with JBoss Rules in an earlier post to this blog &lt;a href="http://jboss-soa-p.blogspot.com/2009/07/when-content-knows-way-content-based.html"&gt;http://jboss-soa-p.blogspot.com/2009/07/when-content-knows-way-content-based.html&lt;/a&gt;). Content based routing is a flexible approach to message routing in that the content in a message is actually the determining factor in determining the route a message takes.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;StaticRouter&lt;/b&gt; (org.jboss.soa.esb.actions.StaticRouter) - As its name implies, this router establishes static routes that do not change based on the content of the messages or a set of routing rules.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;StaticWiretap&lt;/b&gt; (org.jboss.soa.esb.actions.StaticWiretap) - Maybe it's the comic book fan in me, but this is my favorite name for an action. There's something film noir-ish about a "wiretap." You can almost imagine Humphrey Bogart sitting it the back room of a bar listening in on a wiretapped SOA action. (On black and white film, of course.) In practice, it's not all that exciting. This action implements the Enterprise Integration Pattern for a wiretap&lt;a href="http://www.blogger.com/post-create.g?blogID=9094589327053503491#%5B7%5D"&gt;[7]&lt;/a&gt;. The goal of a wiretap is to inspect each message, without affecting the operation of the action chain. This can be a useful action to use to aid in debugging a service.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;Notifiers&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Just as a gateway listener enables you to move ESB-unaware messages (in other words, messages in a format other than (org.jboss.soa.esb.message.Message) onto the SOA Platform's ESB, notifiers (org.jboss.soa.esb.actions.Notifier) enable you to move ESB-aware messages from the ESB to ESB-unaware services. The notifiers convert the ESB-aware messages into data into formats that these services can understand.&lt;br /&gt;&lt;br /&gt;One thing to keep in mind is that the action pipeline has two stages, first normal processing and then outcome processing. Notifiers do not perform any processing of messages during that first stage. They send notifications during the second stage. The notification occurs after the processing of the action pipeline. This means that you cannot use notifiers to alter the results of any action processing. The data sent by the notifier is the ESB message that is processed by the action pipeline. The following notification targets (the names are very self-explanatory) are supported by the SOA Platform:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;NotifyConsole&lt;/b&gt; - Prints the contents of the ESB message to the server log&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;NotifyFiles&lt;/b&gt; - Prints the message contents to a file or files&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;NotifySQLTable&lt;/b&gt; - Inserts the message contents into an existing database table&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;NotifyFTP&lt;/b&gt; - Prints the message contents to a file and then sends the file to a server via FTP&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;NotifyQueues&lt;/b&gt; and &lt;b&gt;NotifyTopics&lt;/b&gt; - Writes the message contents into a JMS message and adds the JMS message to a specified JMS queue or topic&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;NotifyEmail&lt;/b&gt; - Sends the message contents in a mail message&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;Webservices/SOAP&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;When you're considering web services and the SOA Platform, you actually have two separate goals to achieve; you want to be able to expose webservice endpoints as services and you also want to be able to invoke web services from actions defined in a service.&lt;br /&gt;&lt;br /&gt;There are (3) out of the box actions that support web services:&lt;ul&gt;&lt;li&gt;&lt;b&gt;SOAPProcessor&lt;/b&gt; (org.jboss.soa.esb.actions.soap.SOAPProcessor) - This action is only available for use on the SOA Platform embedded server. You use this action to expose webservice endpoints. To do this, you write a "service wrapper webservice" that conforms to the JSR 181&lt;a href="http://www.blogger.com/post-create.g?blogID=9094589327053503491#%5B8%5D"&gt;[8]&lt;/a&gt; ("Web Services Metadata for the Java Platform") standard. JSR 181 enables you to create webservices from a POJO by adding annotations such as @WebService and @WebMethod to it. This service wrapper webservice wraps calls to your service and exposes that service through JBossESB listeners. Your service can also be accessed through other transports (FTP, JMS, etc.) supported by the JBossESB in the SOA Platform.  These 3 types of JBossWS webservice endpoints can be exposed through JBoss ESB listeners using this action:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Webservice bundled into a JBossESB .esb archive - When the webservice .war is bundled into a deployed .esb archive&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Webservice bundled into an .ear - When the .war is bundled into a deployed .ear&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Standalone webservice - When the webservice .war is deployed&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;WISE SOAPClient&lt;/b&gt; (org.jboss.soa.esb.actions.soap.wise.SOAPClient) - This action uses the WISE&lt;a href="http://www.blogger.com/post-create.g?blogID=9094589327053503491#%5B9%5D"&gt;[9]&lt;/a&gt; client service (org.jboss.wise.core.client.WSService) to create a JAX-WS (Java API for XML Web Services) client class and then call the target service. WISE stands for "Wise Invokes Services Easily" and enables the dynamic generation of a client to access web services, without your having to write the code for the client. (This is referred to as "zero-code web service invocation").&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;SOAPClient&lt;/b&gt; (org.jboss.soa.esb.actions.soap.SOAPClient) - This action, uses the soapUI Client Service (org.jboss.soa.esb.services.soapui.SoapUIClientService) to create a message and then route that message to the target service.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;Examples&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;We've already walked through how to use some of the out of the box actions (Business Process Management, Routing, Notifiers) in earlier posts to this blog. Now, let's look at some examples of other types of out of the box actions. As always, the "quickstart" programs in the SOA Platform provide the example code.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Transformation&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;We'll start by looking at transformations and the SmooksAction out of the box action. But first, let's take a look at Smooks. It's common to refer to Smooks as a transformation engine, but that's not the full story. Smooks is really a more general purpose processing framework that is capable of dealing with with fragments of a message. Smooks accomplishes this with "visitor logic", where a "visitor" is Java code that performs a specific action on a specific fragment of a message. This enables Smooks to perform different actions on different fragments of messages. As is stated by the Smooks project&lt;a href="http://www.blogger.com/post-create.g?blogID=9094589327053503491#%5B10%5D"&gt;[10]&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;Smooks supports these types of message fragment processing:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Templating:&lt;/b&gt; Transform message fragments with XSLT or FreeMarker&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Java Binding:&lt;/b&gt; Bind message fragment data into Java objects&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Splitting:&lt;/b&gt; Split messages fragments and rout the split fragments over multiple transports and destinations&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Enrichment:&lt;/b&gt; "Enrich" message fragments with data from databases&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Persistence:&lt;/b&gt; Persist message fragment data to databases&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Validation:&lt;/b&gt; Perform basic or complex validation on message fragment data&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;The SOA Platform SmooksAction out-of-the-box action provides you access to all these Smooks capabilities.&lt;br /&gt;&lt;br /&gt;Let's look at a very simple example, the aptly named "transform_XML2XML_simple" quickstart. This quickstart performs a message transformation by applying an XSLT (EXtensible Stylesheet Language Transformations) to an XML message. The message is transformed into XML in a different form. The interesting parts of the quickstart's jboss-esb.xml file are:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;25  &amp;lt;actions mep="OneWay"&amp;gt;&lt;br /&gt;26      &amp;lt;action name="print-before" class="org.jboss.soa.esb.actions.SystemPrintln"&amp;gt;&lt;br /&gt;27          &amp;lt;property name="message" value="[transform_XML2XML_simple] Message before transformation" /&amp;gt;&lt;br /&gt;28      &amp;lt;/action&amp;gt;&lt;br /&gt;29      &amp;lt;action name="simple-transform" class="org.jboss.soa.esb.smooks.SmooksAction"&amp;gt;&lt;br /&gt;30          &amp;lt;property name="smooksConfig" value="/smooks-res.xml" /&amp;gt;&lt;br /&gt;31          &amp;lt;property name="reportPath" value="/tmp/smooks_report.html" /&amp;gt;&lt;br /&gt;32      &amp;lt;/action&amp;gt;&lt;br /&gt;33      &amp;lt;action name="print-after" class="org.jboss.soa.esb.actions.SystemPrintln"&amp;gt;&lt;br /&gt;34          &amp;lt;property name="message" value="[transform_XML2XML_simple] Message after transformation" /&amp;gt;&lt;br /&gt;35      &amp;lt;/action&amp;gt;&lt;/pre&gt;&lt;ul&gt;&lt;li&gt;Line 25: This line is not specific to transformations, but it's worth mentioning. "mep" stands for "message exchange pattern." The pattern used by this quickstart is "one-way" in that the requester invokes a service (by sending it a message) and then does not wait for a response.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Lines 26-28, 33-35: These lines simply cause the message to be written to the server log before and after its transformation. (org.jboss.soa.esb.actions.SystemPrintln, is, incidentally, the only out-of-the-box action in the Miscellaneous action group.)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Line 29: Here's where we specify that we want to invoke a SmooksAction&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Line 30: And here is the XSLT that will be executed. We'll examine this file in a moment.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Line 31: This line is actually not in the quickstart. I've added the reportPath property it so that we can review the resulting report. Note that generating this report does require some processing resources, so it should not be used in production environments. See below for screen-shots of this report.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_Wad47xG7w3A/Sq7YUh1xweI/AAAAAAAAAyM/t0vusev46iw/s1600-h/Screenshot.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 325px; height: 202px;" src="http://4.bp.blogspot.com/_Wad47xG7w3A/Sq7YUh1xweI/AAAAAAAAAyM/t0vusev46iw/s400/Screenshot.png" alt="" id="BLOGGER_PHOTO_ID_5381476451947233762" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_Wad47xG7w3A/Sq7cPQstyeI/AAAAAAAAAyU/j3pNxzDdYHw/s1600-h/Screenshot-1.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 324px; height: 201px;" src="http://3.bp.blogspot.com/_Wad47xG7w3A/Sq7cPQstyeI/AAAAAAAAAyU/j3pNxzDdYHw/s400/Screenshot-1.png" alt="" id="BLOGGER_PHOTO_ID_5381480759492987362" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now, let's look at smooks-res.xml:&lt;br /&gt;&lt;pre&gt;1  &amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;&lt;br /&gt;2  &amp;lt;smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.0.xsd"&amp;gt;&lt;br /&gt;3&lt;br /&gt;4      &amp;lt;resource-config selector="OrderLine"&amp;gt;&lt;br /&gt;5          &amp;lt;resource type="xsl"&amp;gt;&lt;br /&gt;6              &amp;lt;![CDATA[&amp;lt;line-item&amp;gt;&lt;br /&gt;7                  &amp;lt;product&amp;gt;&amp;lt;xsl:value-of select="./Product/@productId" /&amp;gt;&amp;lt;/product&amp;gt;&lt;br /&gt;8                  &amp;lt;price&amp;gt;&amp;lt;xsl:value-of select="./Product/@price" /&amp;gt;&amp;lt;/price&amp;gt;&lt;br /&gt;9                  &amp;lt;quantity&amp;gt;&amp;lt;xsl:value-of select="@quantity" /&amp;gt;&amp;lt;/quantity&amp;gt;&lt;br /&gt;10              &amp;lt;/line-item&amp;gt;]]&amp;gt;&lt;br /&gt;11          &amp;lt;/resource&amp;gt;&lt;br /&gt;12          &amp;lt;param name="is-xslt-templatelet"&amp;gt;true&amp;lt;/param&amp;gt;&lt;br /&gt;13      &amp;lt;/resource-config&amp;gt;&lt;br /&gt;14  &amp;lt;/smooks-resource-list&amp;gt;&lt;/pre&gt;&lt;ul&gt;&lt;li&gt;Line 2: The namespace referenced here is the Smooks XML Schema Definition&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Line 4: The resource-config element corresponds to an org.milyn.cdr.SmooksResourceConfiguration object&lt;a href="http://www.blogger.com/post-create.g?blogID=9094589327053503491#%5B11%5D"&gt;[11]&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Lines 7-9:  These XPath (XML Path Language) &lt;a href="http://www.blogger.com/post-create.g?blogID=9094589327053503491#%5B12%5D"&gt;[12]&lt;/a&gt; statements locate the Product element's productId and price attributes and the OrderLine element's quantity attributes. XPath is used by XSLT to find or reference data in XML documents.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;When you run this quickstart, you'll see the XML message as defined in SampleOrder.xml displayed before and after it undergoes the XSLT transformation.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Web Services&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Another important feature of the SOA Platform is its ability to publish web services as services. Remember how we talked about how the JBossESB included in the SOA Platform made it possible to deploy web service endpoints as endpoints on the ESB? The services can then also be accessed through other transports (FTP, JMS, etc.) supported by the JBossESB in the SOA Platform.&lt;br /&gt;&lt;br /&gt;We'll look first at the webservice_producer quickstart. This quickstart demonstrates how to expose a JSR181 web service endpoint on the JBossESB within the SOA Platform by using the org.jboss.soa.esb.actions.soap.SOAPProcessor action.&lt;br /&gt;&lt;br /&gt;Let's begin by looking at these lines in jboss-esb.xml:&lt;br /&gt;&lt;pre&gt;37  &amp;lt;actions&amp;gt;&lt;br /&gt;38      &amp;lt;action name="print-before" class="org.jboss.soa.esb.actions.SystemPrintln"&amp;gt;&lt;br /&gt;39          &amp;lt;property name="message"&lt;br /&gt;40              value="[Quickstart_webservice_producer] BEFORE invoking jbossws endpoint"/&amp;gt;&lt;br /&gt;41      &amp;lt;/action&amp;gt;&lt;br /&gt;42      &amp;lt;action name="JBossWSAdapter" class="org.jboss.soa.esb.actions.soap.SOAPProcessor"&amp;gt;&lt;br /&gt;43          &amp;lt;property name="jbossws-endpoint" value="GoodbyeWorldWS"/&amp;gt;&lt;br /&gt;44      &amp;lt;/action&amp;gt;&lt;br /&gt;45      &amp;lt;action name="print-after" class="org.jboss.soa.esb.actions.SystemPrintln"&amp;gt;&lt;br /&gt;46          &amp;lt;property name="message"&lt;br /&gt;47              value="[Quickstart_webservice_producer] AFTER invoking jbossws endpoint"/&amp;gt;&lt;br /&gt;48      &amp;lt;/action&amp;gt;&lt;br /&gt;49      &amp;lt;action name="testStore" class="org.jboss.soa.esb.actions.TestMessageStore"/&amp;gt;&lt;br /&gt;50  &amp;lt;/actions&amp;gt;&lt;/pre&gt;&lt;ul&gt;&lt;li&gt;Lines 38 and 45: As we discussed earlier, the SystemPrintln action displays the message to the server.log&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Lines 42,43: Here is where we invoke the SOAPProcessor action to generate the JSR181 web service from the specified class, GoodbyeWorldWS&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;pre&gt;17  @WebService(name = "GoodbyeWorldWS", targetNamespace="http://webservice_producer/goodbyeworld")&lt;br /&gt;21  @WebMethod&lt;br /&gt;22  public String sayGoodbye(@WebParam(name="message") String message) {&lt;br /&gt;23&lt;br /&gt;24      Message esbMessage = SOAPProcessor.getMessage();&lt;br /&gt;25      if(esbMessage != null) {&lt;br /&gt;26          System.out.println("**** SOAPRequest perhaps mediated by ESB:\n" + esbMessage.getBody().get());&lt;br /&gt;28      }&lt;br /&gt;29      System.out.println("Web Service Parameter - message=" + message);&lt;br /&gt;30      return "... Ah Goodbye then!!!! - " + message;&lt;br /&gt;31  }&lt;/pre&gt;(Remember how we talked about having to write a "service wrapper webservice" that conforms to the JSR 181 ("Web Services Metadata for the Java Platform") standard? You do this by adding @WebService and @WebMethod annotations.)&lt;ul&gt;&lt;li&gt;Line 17: The definition of the web service.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Lines 24-31: The definition of the method in the web service to be invoked when the action is triggered.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;The following lines in jboss-esb.xml are tangential to the goal of demonstrating exposing the webservice endpoint. But it is interesting as is shows some of the paths and protocols that can be used to inserting a message into the JBossESB withing the SOA Platform:&lt;br /&gt;&lt;pre&gt;6   &amp;lt;providers&amp;gt;&lt;br /&gt;7       &amp;lt;jms-provider name="JBossMQ" connection-factory="ConnectionFactory"&amp;gt;&lt;br /&gt;8           &amp;lt;jms-bus busid="quickstartGwChannel"&amp;gt;&lt;br /&gt;9               &amp;lt;jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_webservice_producer_gw"/&amp;gt;&lt;br /&gt;10          &amp;lt;/jms-bus&amp;gt;&lt;br /&gt;11          &amp;lt;jms-bus busid="quickstartEsbChannel"&amp;gt;&lt;br /&gt;12              &amp;lt;jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_webservice_producer_esb"/&amp;gt;&lt;br /&gt;13          &amp;lt;/jms-bus&amp;gt;&lt;br /&gt;14      &amp;lt;/jms-provider&amp;gt;&lt;br /&gt;15&lt;br /&gt;16      &amp;lt;jbr-provider name="JBR-Http" protocol="http" host="localhost"&amp;gt;&lt;br /&gt;17              &amp;lt;jbr-bus busid="Http-1" port="8765" /&amp;gt;&lt;br /&gt;18          &amp;lt;/jbr-provider&amp;gt;&lt;br /&gt;19&lt;br /&gt;20          &amp;lt;jbr-provider name="JBR-Socket" protocol="socket" host="localhost"&amp;gt;&lt;br /&gt;21              &amp;lt;jbr-bus busid="Socket-1" port="8888" /&amp;gt;&lt;br /&gt;22      &amp;lt;/jbr-provider&amp;gt;&lt;br /&gt;23  &amp;lt;/providers&amp;gt;&lt;br /&gt;30  &amp;lt;listeners&amp;gt;&lt;br /&gt;31      &amp;lt;jms-listener name="JMS-Gateway" busidref="quickstartGwChannel" is-gateway="true"/&amp;gt;&lt;br /&gt;32      &amp;lt;jbr-listener name="Http-Gateway" busidref="Http-1" is-gateway="true"/&amp;gt;&lt;br /&gt;33      &amp;lt;jbr-listener name="Socket-Gateway" busidref="Socket-1" is-gateway="true"/&amp;gt;&lt;br /&gt;34      &amp;lt;jms-listener name="JMS-ESBListener" busidref="quickstartEsbChannel"/&amp;gt;&lt;br /&gt;35  &amp;lt;/listeners&amp;gt;&lt;/pre&gt;The last quickstart we'll look at is webservice_consumer1 - as you can guess by its name, this quickstart demonstrates how to access (or "consume") a JSR181 Web Service in an ESB action by using the org.jboss.soa.esb.actions.soap.SOAPClient action.&lt;br /&gt;&lt;br /&gt;This quickstart requires that a web service be deployed for the SOAPClient to access. The webservice is very simple and is deployed in a .war. In HelloWorldWS.java we see the definition of the web service:&lt;br /&gt;&lt;pre&gt;28  @WebService(name = "HelloWorld", targetNamespace = "http://webservice_consumer1/helloworld")&lt;br /&gt;29  public class HelloWorldWS&lt;br /&gt;30  {&lt;br /&gt;31     @WebMethod&lt;br /&gt;32     public String sayHello(@WebParam(name = "toWhom")&lt;br /&gt;33     String toWhom)&lt;br /&gt;34     {&lt;br /&gt;35&lt;br /&gt;36        String greeting = "Hello World Greeting for '" + toWhom + "' on " + new java.util.Date();&lt;br /&gt;37&lt;br /&gt;38        return greeting;&lt;br /&gt;39&lt;br /&gt;40     }&lt;br /&gt;41  }&lt;/pre&gt;&lt;br /&gt;Pay attention to the "toWhome" parameter. We'll look for this in the web service request.&lt;br /&gt;&lt;br /&gt;In MyRequestAction.java, we see that toWhome parameter added as the key in a hashmap for the msg body:&lt;br /&gt;&lt;pre&gt;44  /*&lt;br /&gt;45   * Convert the message into a webservice request map.&lt;br /&gt;46   */&lt;br /&gt;47  public Message process(Message message) throws Exception&lt;br /&gt;48  {&lt;br /&gt;49     logHeader();&lt;br /&gt;50     String msgBody = (String) message.getBody().get();&lt;br /&gt;51     HashMap requestMap = new HashMap();&lt;br /&gt;52&lt;br /&gt;53     // add parameters to the web service request map&lt;br /&gt;54     requestMap.put("sayHello.toWhom", msgBody);&lt;br /&gt;55&lt;br /&gt;56     // The "paramsLocation" property was set in jboss-esb.xml to&lt;br /&gt;57     // "helloworld-request-parameters"&lt;br /&gt;58     message.getBody().add(requestMap);&lt;br /&gt;59     System.out.println("Request map is: " + requestMap.toString());&lt;br /&gt;60&lt;br /&gt;61     logFooter();&lt;br /&gt;62     return message;&lt;br /&gt;63  }&lt;/pre&gt;&lt;ul&gt;&lt;li&gt;Line 54 - The towhome parameter added as the key in a hashmap for the msg body. The key of the HashMap is an Object-Graph Navigation Language (OGNL)&lt;a href="http://www.blogger.com/post-create.g?blogID=9094589327053503491#%5B13%5D"&gt;[13]&lt;/a&gt; expression that identifies the SOAP parameter to be populated with the key's corresponding value. OGNL is an expression language for getting and setting Java objects properties.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Then, MyResponseAction.java retrieves the message and displays the response - see lines 54-55:&lt;br /&gt;&lt;pre&gt;44  /*&lt;br /&gt;45   * Retrieve and output the webservice response.&lt;br /&gt;46   */&lt;br /&gt;47  public Message process(Message message) throws Exception&lt;br /&gt;48  {&lt;br /&gt;49&lt;br /&gt;50     logHeader();&lt;br /&gt;51&lt;br /&gt;52     // The "responseLocation" property was set in jboss-esb.xml to&lt;br /&gt;53     // "helloworld-response"&lt;br /&gt;54     Map responseMsg = (Map) message.getBody().get(Body.DEFAULT_LOCATION);&lt;br /&gt;55     System.out.println("Response Map is: " + responseMsg);&lt;br /&gt;56&lt;br /&gt;57     logFooter();&lt;br /&gt;58     return message;&lt;br /&gt;59  }&lt;/pre&gt;&lt;br /&gt;In jboss-esb.xml:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;36  &amp;lt;actions mep="OneWay"&amp;gt;&lt;br /&gt;37      &amp;lt;action name="request-mapper"&lt;br /&gt;38          class="org.jboss.soa.esb.samples.quickstart.webservice_consumer1.MyRequestAction"&amp;gt;&lt;br /&gt;39      &amp;lt;/action&amp;gt;&lt;br /&gt;40      &amp;lt;action name="soapui-client-action"&lt;br /&gt;41          class="org.jboss.soa.esb.actions.soap.SOAPClient"&amp;gt;&lt;br /&gt;42              &amp;lt;property name="wsdl"&lt;br /&gt;43                  value="http://127.0.0.1:8080/Quickstart_webservice_consumer1/HelloWorldWS?wsdl" /&amp;gt;&lt;br /&gt;44              &amp;lt;property name="responseAsOgnlMap" value="true" /&amp;gt;&lt;br /&gt;45              &amp;lt;property name="SOAPAction" value="sayHello"/&amp;gt;&lt;br /&gt;46      &amp;lt;/action&amp;gt;&lt;br /&gt;47      &amp;lt;action name="response-mapper"&lt;br /&gt;48               class="org.jboss.soa.esb.samples.quickstart.webservice_consumer1.MyResponseAction"&amp;gt;&lt;br /&gt;49      &amp;lt;/action&amp;gt;&lt;br /&gt;50      &amp;lt;action name="testStore" class="org.jboss.soa.esb.actions.TestMessageStore"/&amp;gt;&lt;br /&gt;51  &amp;lt;/actions&amp;gt;&lt;/pre&gt;&lt;ul&gt;&lt;li&gt;Line 41: The SOAPClient class makes the call to the webservice. This is the "zero-code web service invocation" that we mentioned earlier in the post.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Line 43: The reference to the web service's wsdl&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Line 44: The parameter responseAsOgnlMap tells the JBossESB move the SOAP response data into that OGNL-based map and attach it to the message.&lt;br /&gt;Line 45: The reference to the method to be invoked in the web service.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;Closing Thoughts&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;It can be daunting to attempt to create a new service based application from scratch. The SOA Platform's combination of out-of-the-box actions and quickstart can make this task much easier. Even without a jet turbine engine.  ;-)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Resources&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="[1]"&gt;[1] Kinney, Jeff, Diary of a Wimpy Kid, The Last Straw, Amulet Books; 1st edition (January 2009), ISBN-10: 0810970686, ISBN-13: 978-0810970687&lt;br /&gt;&lt;br /&gt;&lt;/a&gt;&lt;a name="[2]"&gt;[2] &lt;/a&gt;&lt;a href="http://www.redhat.com/docs/en-US/JBoss_SOA_Platform/4.3.GA/html/Programmers_Guide/chap-SOA_ESB_Programmers_Guide-Out-of-the-box_Actions.html"&gt;http://www.redhat.com/docs/en-US/JBoss_SOA_Platform/4.3.GA/html/Programmers_Guide/chap-SOA_ESB_Programmers_Guide-Out-of-the-box_Actions.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="[3]"&gt;[3] &lt;/a&gt;&lt;a href="http://xstream.codehaus.org/"&gt;http://xstream.codehaus.org/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="[4]"&gt;[4] &lt;/a&gt;&lt;a href="http://www.smooks.org/mediawiki/index.php?title=Main_Page"&gt;http://www.smooks.org/mediawiki/index.php?title=Main_Page&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="[5]"&gt;[5] &lt;/a&gt;&lt;a href="http://www.milyn.org/javadoc/v1.0/smooks/org/milyn/container/plugin/PayloadProcessor.html"&gt;http://www.milyn.org/javadoc/v1.0/smooks/org/milyn/container/plugin/PayloadProcessor.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="[6]"&gt;[6] &lt;/a&gt;&lt;a href="http://www.enterpriseintegrationpatterns.com/Aggregator.html"&gt;http://www.enterpriseintegrationpatterns.com/Aggregator.html&lt;/a&gt; The patterns described at this site and in the corresponding book were created to assist designers and implementers in creating enterprise software solutions. The patterns are platform and language agnostic, so they can be very helpful across many systems.&lt;br /&gt;&lt;br /&gt;&lt;a name="[7]"&gt;[7] &lt;/a&gt;&lt;a href="http://www.enterpriseintegrationpatterns.com/WireTap.html"&gt;http://www.enterpriseintegrationpatterns.com/WireTap.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="[8]"&gt;[8] &lt;/a&gt;&lt;a href="http://jcp.org/en/jsr/summary?id=181"&gt;http://jcp.org/en/jsr/summary?id=181&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="[9]"&gt;[9] &lt;/a&gt;&lt;a href="http://jboss.org/wise"&gt;http://jboss.org/wise&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="[10]"&gt;[10] &lt;/a&gt;&lt;a href="http://www.smooks.org/mediawiki/index.php?title=Why_Smooks_was_Created"&gt;http://www.smooks.org/mediawiki/index.php?title=Why_Smooks_was_Created&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="[11]"&gt;[11] &lt;/a&gt;&lt;a href="http://www.milyn.org/javadoc/v1.0/smooks/org/milyn/cdr/SmooksResourceConfiguration.html"&gt;http://www.milyn.org/javadoc/v1.0/smooks/org/milyn/cdr/SmooksResourceConfiguration.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="[12]"&gt;[12] &lt;/a&gt;&lt;a href="http://www.w3.org/TR/xpath"&gt;http://www.w3.org/TR/xpath&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="[13]"&gt;[13] &lt;/a&gt;&lt;a href="http://www.opensymphony.com/ognl/"&gt;http://www.opensymphony.com/ognl/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Acknowledgments&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;As always, I'd like to thank the members of the SOA Platform project for their help and timely review comments! Also, this post relies heavily on the extensive SOA Platform documents and the quickstarts.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9094589327053503491-5976428464282862633?l=jboss-soa-p.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jboss-soa-p.blogspot.com/feeds/5976428464282862633/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9094589327053503491&amp;postID=5976428464282862633' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/5976428464282862633'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/5976428464282862633'/><link rel='alternate' type='text/html' href='http://jboss-soa-p.blogspot.com/2009/09/works-great-right-out-of-box.html' title='Works Great Right Out of the Box'/><author><name>Len DiMaggio</name><uri>http://www.blogger.com/profile/07124585546929851174</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='20' src='http://1.bp.blogspot.com/_Wad47xG7w3A/Sc7b75epEEI/AAAAAAAAAQ4/F9-h0znUI7w/S220/Boston.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_Wad47xG7w3A/Sq7VxhPB2vI/AAAAAAAAAyE/v-uG7h8BhkY/s72-c/box_diagram.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9094589327053503491.post-7015689752194549203</id><published>2009-07-23T08:51:00.000-07:00</published><updated>2009-07-23T08:52:46.860-07:00</updated><title type='text'>Another post picked up by DZone...</title><content type='html'>The recent post on Gateways and Notifiers in the SOA Platform was just reposted to DZone here: &lt;br /&gt;&lt;br /&gt;&lt;a href="http://soa.dzone.com/news/soa-platform-gateways-and"&gt;http://soa.dzone.com/news/soa-platform-gateways-and&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9094589327053503491-7015689752194549203?l=jboss-soa-p.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jboss-soa-p.blogspot.com/feeds/7015689752194549203/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9094589327053503491&amp;postID=7015689752194549203' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/7015689752194549203'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/7015689752194549203'/><link rel='alternate' type='text/html' href='http://jboss-soa-p.blogspot.com/2009/07/another-post-picked-up-by-dzone.html' title='Another post picked up by DZone...'/><author><name>Len DiMaggio</name><uri>http://www.blogger.com/profile/07124585546929851174</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='20' src='http://1.bp.blogspot.com/_Wad47xG7w3A/Sc7b75epEEI/AAAAAAAAAQ4/F9-h0znUI7w/S220/Boston.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9094589327053503491.post-6794517083156328318</id><published>2009-07-19T18:45:00.000-07:00</published><updated>2009-07-19T19:03:22.685-07:00</updated><title type='text'>SOA Platform Gateways and Notifiers</title><content type='html'>One of the strengths of the SOA Platform is how it enables you to connect legacy applications together. How are these connections made? To answer that question, we have to think about awareness. &lt;br /&gt;&lt;br /&gt;In this context, "awareness" refers to whether or not your application clients and services are "ESB-aware" or, in other words, whether they can understand the message formats and transport protocols used by the JBossESB in the SOA Platform. If you (as a programmer) are ESB-aware, then you can simply code any new clients and services that you write to also be ESB-aware. ESB-aware clients and services communicate with each other using messages. ESB-aware services are identified using Endpoint References (EPRs). These ESB-aware messages take the form defined by the org.jboss.soa.esb.message interface. &lt;br /&gt;&lt;br /&gt;An ESB-aware message [1] consists of the following components:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Header: the header information contains information such as the destination EPR, the sender EPR, and where the reply goes--general message-level functional information.&lt;br /&gt;&lt;li&gt;Context: additional information that further explains the message; for example, transaction or security data, the identity of the ultimate receiver, or HTTP-cookie-like information.&lt;br /&gt;&lt;li&gt;Body: the actual payload of the message.&lt;br /&gt;&lt;li&gt;Fault: any error information associated with the message.&lt;br /&gt;&lt;li&gt;Attachment: any attachments (additional files) associated with the message.&lt;br /&gt;&lt;li&gt;Properties: any message specific properties (for example the jbossesb.message.id property is a unique value for each message.&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;But...&lt;br /&gt;&lt;br /&gt;What about cases where legacy clients and services that are not ESB-aware? This is suddenly getting complicated. It sounds like you will have to build lots of custom plumbing adapters to get all these combinations of clients and services to talk to each other. But don't panic and don't start building home-grown infrastructure. Supporting interoperability between different clients and services is one of the goals of the SOA Platform.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Interoperability through ESB adapters&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;One of the ways that the SOA Platform makes this interoperability possible is though gateway adapters. A gateway (org.jboss.soa.esb.listeners.gateway) is a service that acts as a bridge between an ESB-aware and an ESB-unaware client and service. Gateways translate information between ESB and non-ESB message formats and EPRs. (EPR stands for endpoint reference.) Gateways are listener processes in that they "listen" for incoming communications. They are different from ESB-aware listeners in that they accept data in different formats such as objects in files or SQL tables. ESB-aware listeners can only accept messages in the org.jboss.soa.esb.message format.&lt;br /&gt;&lt;br /&gt;The SOA Platform supports these gateways:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;file gateways: local filesystem, ftp, sftp and ftps&lt;br /&gt;&lt;li&gt;JMS&lt;br /&gt;&lt;li&gt;HTTP/HTTPS&lt;br /&gt;&lt;li&gt;email (POP3)&lt;br /&gt;&lt;li&gt;SQL table&lt;br /&gt;&lt;li&gt;Hibernate&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;When a gateway listener hears something (incoming data), it converts the non-ESB messages that it receives into the org.jboss.soa.esb.message format. How this conversion happens depends on the gateway type. For example, the file gateway takes the contents of the file and puts it into the location named "BytesBody.BYTES_LOCATION" within the message body.&lt;br /&gt;&lt;br /&gt;Let's look at an example.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;A quick start (with a quickstart)&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;One of the helpful features included in the SOA Platform is the set of "quickstart" sample applications. The quickstarts demonstrate SOA Platform functions and integrations. The goals of the quickstarts are to serve as learning tools and as a starting point for your own application coding. We'll examine one of these quickstarts to view the operation of a gateway.&lt;br /&gt;&lt;br /&gt;Let's assume that you have a legacy application that stores data in text files. What you want to do is to create an ESB-aware service to read these files and process them as they are created. You could write infrastructure code that periodically polls a target directory to determine when a new file is deposited there. With the SOA Platform, however, you can simply use a file gateway.&lt;br /&gt;&lt;br /&gt;The quickstarts are distributed under the samples/quickstarts directory. Let's take a look at helloworld_file_action.&lt;br /&gt;&lt;pre&gt;cd samples/quickstarts/helloworld_file_action&lt;/pre&gt;&lt;br /&gt;Deploy the test to the server and run it  with these simple commands:&lt;br /&gt;&lt;pre&gt;ant deploy&lt;br /&gt;ant runtest&lt;/pre&gt;&lt;br /&gt;The server log should look something like this:&lt;br /&gt;&lt;pre&gt;16:42:22,744 INFO [STDOUT] Message structure:&lt;br /&gt;16:42:22,744 INFO [STDOUT] [Hello World In A File].&lt;br /&gt;16:42:22,746 INFO [STDOUT]&lt;br /&gt;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&lt;br /&gt;16:42:22,746 INFO [STDOUT] Body: Hello World In A File&lt;br /&gt;16:42:22,746 INFO [STDOUT] &amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&lt;br /&gt;16:42:22,747 INFO [STDOUT] Message structure:&lt;br /&gt;16:42:22,747 INFO [STDOUT] [ message: [ JBOSS_XML ]&lt;/pre&gt;&lt;br /&gt;What just happened here? Let's take a look. The "runtest" ant target invokes CreateTestFile.java program. As its name implies, this program creates a test file. The file contains this text: "Hello World In A File"&lt;br /&gt;&lt;br /&gt;For what happens next, we need to look at how the test application is configured. A SOA Platform application's primary configuration file is named jboss-esb.xml. In the case of this quickstart, that file is generated at run time so that the SOA Platform install directory can be determined. So, we need to look at the source of the generated file, which is this file: jboss-esb-unfiltered.xml&lt;br /&gt;&lt;br /&gt;The first part of the file that we're interested in looks like this:&lt;br /&gt;&lt;pre&gt;1  &amp;lt;fs-provider name="FSprovider1"&amp;gt;&lt;br /&gt;2      &amp;lt;fs-bus busid="helloFileChannel" &amp;gt;&lt;br /&gt;3          &amp;lt;fs-message-filter&lt;br /&gt;4              directory="@INPUTDIR@"&lt;br /&gt;5              input-suffix=".dat"&lt;br /&gt;6              work-suffix=".esbWorking"&lt;br /&gt;7              post-delete="false"&lt;br /&gt;8              post-directory="@OUTPUTDIR@"&lt;br /&gt;9              post-suffix=".sentToEsb"&lt;br /&gt;10             error-delete="false"&lt;br /&gt;11             error-directory="@ERRORDIR@"&lt;br /&gt;12             error-suffix=".IN_ERROR"&lt;br /&gt;13         /&amp;gt;&lt;br /&gt;14     &amp;lt;/fs-bus&amp;gt;&lt;br /&gt;15 &amp;lt;/fs-provider&amp;gt;   &lt;/pre&gt;&lt;br /&gt;The lines that we're most interested in are:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Line 4,5: This is the definition for the input file directory and extension that the listener "listens for."&lt;br /&gt;&lt;li&gt;Line 6: When the message in the file is being processed, a work file with this extension is created by the listener.&lt;br /&gt;&lt;li&gt;Lines 7-9: And, when that processing is complete, the message is written to a file in the output directory. The file is retained after the listener is complete.&lt;br /&gt;&lt;li&gt;Lines 10-12: Unless something goes wrong, then the message is written to an error file.&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;This is the definition of the file gateway that we'll use. Note the directory names. In this example, they are filled in at run time from values determined by the directory in which you installed the SOA Platform.&lt;br /&gt;&lt;br /&gt;Now, remember how we said that everything is either a message or a service? Scroll down in the file and we'll see our service.&lt;br /&gt;&lt;pre&gt;1  &amp;lt;service&lt;br /&gt;2      category="myCategory"&lt;br /&gt;3      name="myFileListener"&lt;br /&gt;4      description="Hello World File Action (esb listener)" &amp;gt;&lt;br /&gt;5&lt;br /&gt;6      &amp;lt;listeners&amp;gt;&lt;br /&gt;7          &amp;lt;fs-listener name="FileGateway"&lt;br /&gt;8              busidref="helloFileChannel"&lt;br /&gt;9              maxThreads="1"&lt;br /&gt;10             is-gateway="true"&lt;br /&gt;11             poll-frequency-seconds="10"&lt;br /&gt;12         /&amp;gt;&lt;br /&gt;13         &amp;lt;jms-listener name="helloWorldFileAction"&lt;br /&gt;14             busidref="quickstartEsbChannel"&lt;br /&gt;15             maxThreads="1"&lt;br /&gt;16         /&amp;gt;&lt;br /&gt;17     &amp;lt;/listeners&amp;gt;&lt;br /&gt;18 &lt;br /&gt;19     &amp;lt;actions mep="OneWay"&amp;gt;&lt;br /&gt;20         &amp;lt;action name="testAction" class="org.jboss.soa.esb.actions.SystemPrintln" /&amp;gt;&lt;br /&gt;21         &amp;lt;action name="action1"&lt;br /&gt;22             class="org.jboss.soa.esb.samples.quickstart.helloworldfileaction.MyAction"&lt;br /&gt;23             process="displayMessage,playWithMessage"&lt;br /&gt;24         /&amp;gt;&lt;br /&gt;25         &amp;lt;action name="dump" class="org.jboss.soa.esb.actions.SystemPrintln"&amp;gt;&lt;br /&gt;26         &amp;lt;property name="printfull" value="true"/&amp;gt;&lt;br /&gt;27     &amp;lt;/actions&amp;gt;&lt;br /&gt;28 &amp;lt;/service&amp;gt;   &lt;/pre&gt;&lt;br /&gt;Let's look at this service description.&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Lines 7-12: First, the listeners. Note the definition of the file system (fs) listener. This is our gateway. The "busidref" field references the "fs-provider" that we discussed a minute ago. Did you notice a second listener? This is an ESB-aware JMS listener. It is there because the SOA Platform requires that each gateway have a corresponding ESB listener defined.&lt;br /&gt;&lt;li&gt;Lines 19: Let's look at the actions. The "mep" definition of "OneWay" refers to the action pipeline (the sequence of actions) explicitly not sending a response. (You can find more detail about these definitions in the SOA Platform Programmers' Guide [2].)&lt;br /&gt;&lt;li&gt;Lines 20, 25-26: The actions named "testAction" and "dump" write the message to the server log. &lt;br /&gt;&lt;li&gt;Lines 21-23: The action that we're most interested in is "action1." The methods (displayMessage, playWithMessage) in the class referred to by this action (org.jboss.soa.esb.samples.quickstart.helloworldfileaction.MyAction) receive the data in the input file as an ESB-Aware message, extract that information, and process it. In the case of your application, you would replace “MyAction” with your own business logic code.&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;So, in summary, what happens when this quickstart is run?&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;The file system gateway is initialized.&lt;br /&gt;&lt;li&gt;A file is created in the input directory defined in its fs-provider definition.&lt;br /&gt;&lt;li&gt;The gateway reads the file, transforms it into an ESB-aware message, and passes the message to the methods in the action class defined in the action definition.&lt;br /&gt;&lt;li&gt;These methods process the message (in the case of the quickstart, they write the message contents to the server log).5. The gateway moves the file to the output directory defined in its fs-provider definition.&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;It's important to note that the only new code that had to be written is the action class. The infrastructure code to listen for and transform the file into a message in the format that the SOA Platform can process is all part of the gateway.&lt;br /&gt;&lt;br /&gt;From the perspective of an application developer, this is a plus as you can concentrate on writing code to fulfill the business process requirements of your application.&lt;br /&gt;&lt;br /&gt;From the perspective of a QE engineer, this is a real plus as it means that less code has to be written. And, the less code, the fewer opportunities for bugs!&lt;br /&gt;&lt;br /&gt;&lt;b&gt;The Data is in the SOA Platform, Now What?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The gateway listeners make it possible for your legacy applications to get data into the SOA Platform's ESB and have that data transformed into ESB-aware messages, so that the ESB can route the data to the desired destination service. However, that's only have the battle if the destination service is another legacy application that is also not ESB-aware. How can you easily transform the messages into a form that a legacy application can process?&lt;br /&gt;&lt;br /&gt;The answer is to use one of the SOA Platform's notifiers. Just as a gateway listener enables you to move ESB-unaware messages onto the SOA Platform's ESB, notifiers enable you to move ESB-aware messages from the ESB to ESB-unaware services. The notifiers convert the ESB-aware messages into data into various forms that your services can understand. The SOA Platform supports these notifiers:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;NotifyConsole&lt;br /&gt;&lt;li&gt;NotifyFiles&lt;br /&gt;&lt;li&gt;NotifySQLTable&lt;br /&gt;&lt;li&gt;NotifyFTP&lt;br /&gt;&lt;li&gt;NotifyQueues&lt;br /&gt;&lt;li&gt;NotifyTopics&lt;br /&gt;&lt;li&gt;NotifyEmail&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;Let's add some of these notifiers to the helloworld_file_action quickstart. Note that while there are other quickstarts dedicated to illustrating notifiers, our expanding on the helloworld_file_action quickstart is in keeping with one of the goals of the quickstarts; to give you a starting point for developing your own customer applications.&lt;br /&gt;&lt;br /&gt;One thing to keep in mind is that the action pipeline has two stages, first normal processing and then outcome processing. Notifiers do not perform any processing of messages during that first stage. They send notifications during the second stage. The notification occurs after the processing of the action pipeline. This means that you cannot use notifiers to alter the results of any action processing. The data sent by the notifier is the ESB message that is processed by the action pipeline. [3]&lt;br /&gt;&lt;br /&gt;Let's insert the following statements (without the line numbers) into the service defined in the quickstart's jboss-esb-unfiltered.xml file:&lt;br /&gt;&lt;pre&gt;1  &amp;lt;action name="notificationAction" class="org.jboss.soa.esb.actions.Notifier"&amp;gt;&lt;br /&gt;2      &amp;lt;property name="okMethod" value="notifyOK" /&amp;gt;&lt;br /&gt;3      &amp;lt;property name="notification-details"&amp;gt;&lt;br /&gt;4          &amp;lt;NotificationList type="ok"&amp;gt;&lt;br /&gt;5              &amp;lt;target class="NotifyConsole"/&amp;gt;&lt;br /&gt;6              &amp;lt;target class="NotifyFiles"&amp;gt;&lt;br /&gt;7                  &amp;lt;file append="false" URI="@OUTPUTDIR@/notify.txt"/&amp;gt;&lt;br /&gt;8                  &amp;lt;file append="true" URI="@OUTPUTDIR@/results.log"/&amp;gt;&lt;br /&gt;9              &amp;lt;/target&amp;gt;&lt;br /&gt;10             &amp;lt;target class="NotifyEmail" &lt;br /&gt;11                 from="soauser@server.com" &lt;br /&gt;12                 sendTo="user@server.com.com"&lt;br /&gt;13                 ccTo="admin@server.com"&lt;br /&gt;14                 subject="Test was successful" &lt;br /&gt;15                 message="See attached file"&amp;gt;&lt;br /&gt;16                 &amp;lt;attachment&amp;gt;@OUTPUTDIR@/notify.txt&amp;lt;/attachment&amp;gt;&lt;br /&gt;17             &amp;lt;/target&amp;gt;&lt;br /&gt;18         &amp;lt;/NotificationList&amp;gt;&lt;br /&gt;19         &amp;lt;NotificationList type="err"&amp;gt;&lt;br /&gt;20             &amp;lt;target class="NotifyConsole"/&amp;gt;&lt;br /&gt;21             &amp;lt;target class="NotifyFiles"&amp;gt;&lt;br /&gt;22                 &amp;lt;file append="true" URI="@ERRORDIR@/error.log"/&amp;gt;&lt;br /&gt;23             &amp;lt;/target&amp;gt;&lt;br /&gt;24         &amp;lt;/NotificationList&amp;gt;&lt;br /&gt;25     &amp;lt;/property&amp;gt;&lt;br /&gt;26 &amp;lt;/action&amp;gt;   &lt;/pre&gt;&lt;br /&gt;Before we re-deploy and rerun the quickstart, we'll walk through these new statements:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Line 1: Note the reference to the Notifier class&lt;br /&gt;&lt;li&gt;Line 2: The okMethod enables the server to notify about success or failure at each action in the action pipeline&lt;br /&gt;&lt;li&gt;Line 4: These notifications will happen if the processing of the action pipeline is successful&lt;br /&gt;&lt;li&gt;Line 5: The simplest notifier - the ESB message is sent to the server console log&lt;br /&gt;&lt;li&gt;Line 6: Since we started the quickstart by creating a file, we'll generate another file with the NotifyFiles notifier.&lt;br /&gt;&lt;li&gt;Line 7: The ESB message is written to a file named "notify.txt" in the output dir. Note that if a file with this name already exists, it is overwritten.&lt;br /&gt;&lt;li&gt;Line 8: We'll also append the ESB message to a log file.&lt;br /&gt;&lt;li&gt;Line 10: And, we'll send that same ESB message in an email - the ESB message will be in the email&lt;br /&gt;&lt;li&gt;Line 11: But, just to be sure, we'll also send the notify.txt file as an attachment to the email&lt;br /&gt;&lt;li&gt;Line 19: Finally, if the action pipeline processing encounters an error, these notifiers will execute&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;At this point, redeploy the quickstart and execute "ant runtest" again. &lt;br /&gt;&lt;br /&gt;The server log should look something like this:&lt;br /&gt;&lt;pre&gt; 2009-07-18 22:45:33,291 INFO  [STDOUT] ConsoleNotifier 2009/07/18 10:45:33.291&amp;lt;&lt;br /&gt;BEFORE&lt;br /&gt;Hello World In A File&lt;br /&gt;AFTER&lt;br /&gt;&gt;&lt;br /&gt;2009-07-18 22:45:33,292 INFO  [org.jboss.soa.esb.helpers.Email] Initialising mail server session. Properties: {mail.smtp.port=25, mail.smtp.auth=true, mail.smtp.host=localhost}   &lt;/pre&gt;&lt;br /&gt;For the console and email notifier. An email will be sent to the addresses you specified and you should also see a file named notify.txt and results.log in the output directory. If you run the test again, you'll see the results.log file include the ESB message twice.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Closing Thoughts&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;With the SOA Platform's gateways and notifiers, it's possible to reuse existing applications as services that are ESB-unaware, without having to rewrite the applications' code. The applications can continue to communicate via files or FTP or database records or other data formats. The gateways and notifiers take care of getting data into the SOA Platform (where you can route it to the intended service - see the previous post on content based routing) and then back out. And, that is a lot easier than having to rewrite legacy applications. COBOL anybody?   ;-)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Resources&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;[1] Look in this file in the javadocs installed with your SOA Platform server: jboss/soa/esb/message/Message.html&lt;br /&gt;[2] &lt;a href="http://www.redhat.com/docs/en-US/JBoss_SOA_Platform/4.3.GA/html/Programmers_Guide"&gt;http://www.redhat.com/docs/en-US/JBoss_SOA_Platform/4.3.GA/html/Programmers_Guide&lt;/a&gt;&lt;br /&gt;[3] &lt;a href="http://www.redhat.com/docs/en-US/JBoss_SOA_Platform/4.3.GA/html/Programmers_Guide/ch11s06.html"&gt;http://www.redhat.com/docs/en-US/JBoss_SOA_Platform/4.3.GA/html/Programmers_Guide/ch11s06.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Acknowledgments&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;As always, I'd like to thank the members of the SOA Platform project for their help and timely review comments! Also, this post relies heavily on the extensive SOA Platform documents and the quickstarts. The information on listeners in this post was originally published in Red Hat Magazine (&lt;a href="http://magazine.redhat.com/2008/05/22/adapters-for-an-esb"&gt;http://magazine.redhat.com/2008/05/22/adapters-for-an-esb&lt;/a&gt;). I'd like to thank everyone at the magazine for their help over the past few years, especially the magazine editor, Bascha Harris.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9094589327053503491-6794517083156328318?l=jboss-soa-p.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jboss-soa-p.blogspot.com/feeds/6794517083156328318/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9094589327053503491&amp;postID=6794517083156328318' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/6794517083156328318'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/6794517083156328318'/><link rel='alternate' type='text/html' href='http://jboss-soa-p.blogspot.com/2009/07/soa-platform-gateways-and-notifiers.html' title='SOA Platform Gateways and Notifiers'/><author><name>Len DiMaggio</name><uri>http://www.blogger.com/profile/07124585546929851174</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='20' src='http://1.bp.blogspot.com/_Wad47xG7w3A/Sc7b75epEEI/AAAAAAAAAQ4/F9-h0znUI7w/S220/Boston.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9094589327053503491.post-3946907485597837456</id><published>2009-07-14T10:34:00.000-07:00</published><updated>2009-07-14T10:51:35.870-07:00</updated><title type='text'>DZone Reposts Content Based Routing Post</title><content type='html'>The recent post on Content Based Routing with JBoss Rules in the SOA Platform was just reposted to DZone here:  &lt;a href="http://soa.dzone.com/news/when-content-knows-way-content?mz=3006-jboss"&gt;http://soa.dzone.com/news/when-content-knows-way-content?mz=3006-jboss&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It's a bit recursive - posting a post about a post - but it's good to see this subject in DZOne too!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9094589327053503491-3946907485597837456?l=jboss-soa-p.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jboss-soa-p.blogspot.com/feeds/3946907485597837456/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9094589327053503491&amp;postID=3946907485597837456' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/3946907485597837456'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/3946907485597837456'/><link rel='alternate' type='text/html' href='http://jboss-soa-p.blogspot.com/2009/07/dzone-reposts-content-based-routing.html' title='DZone Reposts Content Based Routing Post'/><author><name>Len DiMaggio</name><uri>http://www.blogger.com/profile/07124585546929851174</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='20' src='http://1.bp.blogspot.com/_Wad47xG7w3A/Sc7b75epEEI/AAAAAAAAAQ4/F9-h0znUI7w/S220/Boston.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9094589327053503491.post-8154396793468668742</id><published>2009-07-06T19:15:00.000-07:00</published><updated>2009-07-06T19:22:56.396-07:00</updated><title type='text'>When the Content Knows the Way - Content Based Routing in the SOA Platform</title><content type='html'>In my last post to this blog, I examined the ESB-jBPM integration in the SOA Platform. This time, we'll take a look at one aspect of the integration with JBoss Rules.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Introduction&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The routing of data from one place to another is one of the most basic, and common, problems facing any networked software application. This routing can take many forms, such as email being sent to the correct recipient or network traffic being routed around the globe based on system names defined in DNS.&lt;br /&gt;&lt;br /&gt;In the context of an Enterprise Service Bus such as the JBoss ESB in the SOA Platform, where everything is either a message or a service, routing means getting messages delivered to the correct services. There are multiple ways to route data to a service. It's possible to define these routes statically, which can make sense for an application where  some type of data is always directed to a set endpoint. But, this approach will fail if a destination service is unavailable or is moved. You can control the route that the messages take across the ESB in a number of ways. In this post, we'll examine routing messages based on message content with the content based routing pattern as illustrated in one of the SOA Platform "quickstart" sample programs.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;JBoss Rules&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;One of the great challenges in developing business application software is the separation between the business logic, or the "rules" that you want to govern the application, and the technical programming tasks necessary to actually build the application. What's more, it can be expensive and difficult to maintain application code, and keep it in synch with constantly changing business conditions and while not destroying the original design and turning the code into a set of ever more complex if-then-else statements. What's needed is a mechanism to define the business rules and then execute the rules without having to hardcode the rules into the application code.&lt;br /&gt;&lt;br /&gt;What's needed is a rules engine. JRS-94[1] defines the standard for a Java rules engine API. The standard defines the API to register, retrieve and execute rules. JBoss Drools[2] (referred to as JBoss Rules in the SOA Platform) is based on this standard, but more than just a rules API and rules programming language, Drools is a complete enterprise platform for rules-based application development, workflow, administration, and event processing. It also provides an integration with JBossESB to support content based routing.&lt;br /&gt;&lt;br /&gt;Let's start by examining at the term "content based routing."[3] The routing part of the term is easy; we're talking about getting messages routed to the correct service. When we talk about "content based" routing, what we want to have happen is to have the ESB examine a message, and based on its content, select the correct routing path. But, we don't want to have the code to make these routing decisions built into the services or the ESB itself. We want to use a rules-based approach, where we can take advantage of the power and flexibility of a rules definition language to construct the decision making routing. We also want to take advantage of the efficiency of a rules engine to perform this routing, instead of coding complex and hard to maintain if-then-else statements into the application.&lt;br /&gt;&lt;br /&gt;OK. It's time to look at a working example.&lt;br /&gt;&lt;br /&gt;One of the great features of the SOA Platform is its extensive set of "quickstart" programs. These programs illustrate various features supported by the ESB. For our example, we'll look at the fun_cbr quickstart.&lt;br /&gt;&lt;br /&gt;Like many of the quickstarts, fun_cbr starts by placing a message into a queue. A service listening to that queue then takes that message and sends it to a destination service. What we're interested in looking at in this quickstart, is how the content of that message determines the route that the message takes to one of three defined destination services.&lt;br /&gt;&lt;br /&gt;Let's start by examining with the message and its content. When you run the quickstart, the "SampleOrder.xml" (for a mythical DVD store) is file is read into the message that is sent. The file looks like this:&lt;br /&gt;&lt;br /&gt;In SampleOrder.xml:&lt;pre&gt;&lt;br /&gt;    1  &amp;lt;Order xmlns="http://org.jboss.soa.esb/Order" orderId="1" statusCode="0"&lt;br /&gt;    2      netAmount="59.97" totalAmount="64.92" tax="4.95"&amp;gt;&lt;br /&gt;    3    &amp;lt;Customer userName="user1" firstName="Harry" lastName="Fletcher" state="SD"/&amp;gt;&lt;br /&gt;    4      &amp;lt;OrderLines&amp;gt;&lt;br /&gt;    5        &amp;lt;OrderLine position="1" quantity="1"&amp;gt;&lt;br /&gt;    6        &amp;lt;Product productId="364" title="The 40-Year-Old Virgin " price="29.98"/&amp;gt;&lt;br /&gt;    7      &amp;lt;/OrderLine&amp;gt;&lt;br /&gt;    8      &amp;lt;OrderLine position="2" quantity="1"&amp;gt;&lt;br /&gt;    9        &amp;lt;Product productId="299" title="Pulp Fiction" price="29.99"/&amp;gt;&lt;br /&gt;   10      &amp;lt;/OrderLine&amp;gt;&lt;br /&gt;   11    &amp;lt;/OrderLines&amp;gt;&lt;br /&gt;   12  &amp;lt;/Order&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Nothing in this content is that unusual (except perhaps for Harry's taste in movies). Make a mental note of the "statusCode" element on line #1. We'll come back to this in a bit.&lt;br /&gt;&lt;br /&gt;OK, we have build a message that contains this content and place that message in a queue so that a service can receive it and execute an action on it. Now what?&lt;br /&gt;&lt;br /&gt;Let's look at that action in the "jboss-esb.xml" file. (This file defines the configuration of, and the actions performed, by the quickstart.)&lt;br /&gt;&lt;br /&gt;In jboss-esb.xml:&lt;pre&gt;&lt;br /&gt;   44    &amp;lt;action class="org.jboss.soa.esb.actions.ContentBasedRouter" name="ContentBasedRouter"&amp;gt;&lt;br /&gt;   45      &amp;lt;property name="ruleSet" value="FunCBRRules-XPath.drl"/&amp;gt;&lt;br /&gt;   46      &amp;lt;property name="ruleLanguage" value="XPathLanguage.dsl"/&amp;gt;&lt;br /&gt;   47      &amp;lt;property name="ruleReload" value="true"/&amp;gt;&lt;br /&gt;   48      &amp;lt;property name="destinations"&amp;gt;&lt;br /&gt;   49        &amp;lt;route-to destination-name="blue"  service-category="BlueTeam"  service-name="GoBlue" /&amp;gt;&lt;br /&gt;   50        &amp;lt;route-to destination-name="red"   service-category="RedTeam"   service-name="GoRed" /&amp;gt;&lt;br /&gt;   51        &amp;lt;route-to destination-name="green" service-category="GreenTeam" service-name="GoGreen" /&amp;gt;&lt;br /&gt;   52      &amp;lt;/property&amp;gt;&lt;br /&gt;   53    &amp;lt;/action&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Let's examine this section of the file line-by-line:&lt;br /&gt;&lt;br /&gt;Line 44: The org.jboss.soa.esb.actions.ContentBasedRouter class is one of the SOA Platform's predefined "Out-of-the-box Actions." The SOA Platform provides a set of these actions, that you can always augment by writing your own custom actions[4]. Before you write your own, you should take a look at the out-of-the-box actions as you may find one that meets your application's needs.&lt;br /&gt;&lt;br /&gt;Line 45: Here's where we define the set of rules that govern the content based routing. Remember that in this context, the rules are defined as JBoss Rules. We'll examine these rules in just a minute.&lt;br /&gt;&lt;br /&gt;Line 46: In order to be able to parse information out of XML data in a message, the SOA Platform includes a domain specific language (DSL) implementation to use XPath to traverse the XML. This is defined in the jboss-as/server/production/deploy/jbrules.esb/XPathLanguage.dsl file. If you're unfamiliar with XPath[5], it's really worth learning as it has many useful applications. For example, some GUI automation tools such as Selenium support using XPath to locate UI elements if you are unable to rely on the UI elements having static ID's. Also note that XPathLanguage.dsl supports both namespace specific and non-namespace specific syntaxes. In this quickstart, a namespace specific syntax is used.&lt;br /&gt;&lt;br /&gt;Line 47: This property allows you to specify if the rules should be reloaded each time they are used. This has no effect on the small set of rules used in the quickstart, but it can cause a performance hit on a large set of rules. So, setting this to "true" enables you to modify the rules as defined in the copy of FunCBRRules-XPath.drl deployed to the server without having to redeploy the quickstart to the SOA-P server. Modifying the local copy of the rules file will not cause the rules to be reloaded. You have to update the drl file that is deployed with the quickstart.&lt;br /&gt;&lt;br /&gt;Lines 49-51: These are the routes to the destination services.&lt;br /&gt;&lt;br /&gt;Now it's time to take a look at the rules that are defined in FunCBRRules-XPath.drl&lt;br /&gt;&lt;br /&gt;In FunCBRRules-XPath.drl:&lt;pre&gt;&lt;br /&gt;    1  package com.jboss.soa.esb.routing.cbr&lt;br /&gt;    2&lt;br /&gt;    3  #list any import classes here.&lt;br /&gt;    4  import org.jboss.soa.esb.message.Message;&lt;br /&gt;    5  import org.jboss.soa.esb.message.format.MessageType;&lt;br /&gt;    6&lt;br /&gt;    7  expander XPathLanguage.dsl&lt;br /&gt;    8&lt;br /&gt;    9  #declare any global variables here&lt;br /&gt;   10  global java.util.List destinations;&lt;br /&gt;   11&lt;br /&gt;   12  rule "Blue Routing Rule using XPATH"&lt;br /&gt;   13    when&lt;br /&gt;   14      xpathEquals expr "/order:Order/@statusCode", "0" use namespaces "order=http://org.jboss.soa.esb/Order"&lt;br /&gt;   15    then&lt;br /&gt;   16      Log : "Blue Team";&lt;br /&gt;   17      Destination : "blue";&lt;br /&gt;   18  end&lt;br /&gt;   19&lt;br /&gt;   20  rule "Red Routing Rule using XPATH"&lt;br /&gt;   21    when&lt;br /&gt;   22      xpathEquals expr "/order:Order/@statusCode", "1" use namespaces "order=http://org.jboss.soa.esb/Order"&lt;br /&gt;   23    then&lt;br /&gt;   24      Log : "Red Team";&lt;br /&gt;   25      Destination : "red";&lt;br /&gt;   26  end&lt;br /&gt;   27&lt;br /&gt;   28  rule "Green Routing Rule using XPATH"&lt;br /&gt;   29    when&lt;br /&gt;   30      xpathEquals expr "/order:Order/@statusCode", "2" use namespaces "order=http://org.jboss.soa.esb/Order"&lt;br /&gt;   31    then&lt;br /&gt;   32      Log : "Green Team";&lt;br /&gt;   33      Destination : "green";&lt;br /&gt;   34  end&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Line 7: Here is the reference to the XPath definitions.&lt;br /&gt;&lt;br /&gt;Line 10: The destinations global variable is the point of integration to the destinations defined in the jboss-esb.xml file.&lt;br /&gt;&lt;br /&gt;The rules are all the same, except for the status code value, so we'll only examine one of them. (In the process, we'll walk through a short lesson in writing a rule.)&lt;br /&gt;&lt;br /&gt;Line 12: The start of a rule definition.&lt;br /&gt;&lt;br /&gt;Line 13: The start of the "when" construct of a rule. Each rule definition includes a "when" construct (the criteria that must be met) and a "then" construct (the action to take if the "when" construct is met).&lt;br /&gt;&lt;br /&gt;Line 14: The XPath syntax translates to "starting at the root of the document, find an Order element with a statusCode attribute equal to 0."&lt;br /&gt;&lt;br /&gt;Line 15: The then construct starts here.&lt;br /&gt;&lt;br /&gt;Line 16: Generate a log message&lt;br /&gt;&lt;br /&gt;Line 17: Add a destination's name to the global list called "destinations, " which is then evaluated by org.jboss.soa.esb.actions.ContentBasedRouter that invoked the rule.&lt;br /&gt;&lt;br /&gt;If you're getting a little lost now, this diagram may shows how things are connected.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_Wad47xG7w3A/SlKw6hxWIZI/AAAAAAAAAX0/mgfYQEay-4A/s1600-h/CBR.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 309px; height: 400px;" src="http://1.bp.blogspot.com/_Wad47xG7w3A/SlKw6hxWIZI/AAAAAAAAAX0/mgfYQEay-4A/s400/CBR.jpg" alt="" id="BLOGGER_PHOTO_ID_5355537426441183634" border="0" /&gt;&lt;/a&gt;So what happens when the quickstart is deployed and run?&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;An incoming message is placed into the queue that is watched by the listener configured with the ContentBasedRouter action&lt;br /&gt;&lt;/li&gt;&lt;li&gt;That action is configured with the rule set defined in FunCBRRules-XPath.drl&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The action class puts the message into the Rules' working memory and fires the rules&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Based on the results of the rules, a list of destinations is created&lt;br /&gt;&lt;/li&gt;&lt;li&gt;And the message is sent to the services at those destinations - in the case of this test, the message is sent to the blue team&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;(There's actually a bit more to it for the incoming message. JBoss ESB actually routes ESB formatted messages to services. The ESB supports adapters to enable other formats for incoming messages. These adapters operate with "gateway" services to enable you to connect existing services to the SOA Platform.[6])&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Closing Thoughts&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;As we discussed in the introduction, one of the great strengths of the SOA Platform is the set of integrations that it supports. With its integration with JBoss Rules, you can deploy Rules-based services to the SOA Platform server and utilize JBoss Rules for content based routing. With content based routing, the information in the messages themselves determine the messages' destinations.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;References&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;[1] &lt;a href="http://jcp.org/en/jsr/detail?id=94"&gt;http://jcp.org/en/jsr/detail?id=94&lt;/a&gt;&lt;br /&gt;[2] &lt;a href="http://www.jboss.org/drools"&gt;http://www.jboss.org/drools&lt;/a&gt;&lt;br /&gt;[3] &lt;a href="http://www.jboss.org/jbossesb/docs/4.3.GA/manuals/html/services/ContentBasedRouting.html"&gt;http://www.jboss.org/jbossesb/docs/4.3.GA/manuals/html/services/ContentBasedRouting.html&lt;/a&gt;&lt;br /&gt;[4] &lt;a href="http://www.redhat.com/docs/en-US/JBoss_SOA_Platform/4.3.GA/html/Programmers_Guide/ch11s05.html"&gt;http://www.redhat.com/docs/en-US/JBoss_SOA_Platform/4.3.GA/html/Programmers_Guide/ch11s05.html&lt;/a&gt;&lt;br /&gt;[5] &lt;a href="http://www.w3schools.com/XPath/default.asp"&gt;http://www.w3schools.com/XPath/default.asp&lt;/a&gt;&lt;br /&gt;[6] &lt;a href="http://magazine.redhat.com/2008/05/22/adapters-for-an-esb"&gt;http://magazine.redhat.com/2008/05/22/adapters-for-an-esb&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Acknowledgments&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;As always, I'd like to thank the members of the JBossESB (see http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/Contributors.txt), JBoss Rules projects, SOA Platform project - especially Burr Sutter, Mark Little, Mark Proctor and Jarek Kijanowski - for their help and timely review comments! Also, this article relies heavily on the extensive JBossESB and JBoss Rules user documents and the quickstarts.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9094589327053503491-8154396793468668742?l=jboss-soa-p.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jboss-soa-p.blogspot.com/feeds/8154396793468668742/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9094589327053503491&amp;postID=8154396793468668742' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/8154396793468668742'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/8154396793468668742'/><link rel='alternate' type='text/html' href='http://jboss-soa-p.blogspot.com/2009/07/when-content-knows-way-content-based.html' title='When the Content Knows the Way - Content Based Routing in the SOA Platform'/><author><name>Len DiMaggio</name><uri>http://www.blogger.com/profile/07124585546929851174</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='20' src='http://1.bp.blogspot.com/_Wad47xG7w3A/Sc7b75epEEI/AAAAAAAAAQ4/F9-h0znUI7w/S220/Boston.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_Wad47xG7w3A/SlKw6hxWIZI/AAAAAAAAAX0/mgfYQEay-4A/s72-c/CBR.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9094589327053503491.post-9052784223709750105</id><published>2009-06-15T07:49:00.000-07:00</published><updated>2009-06-15T07:56:06.385-07:00</updated><title type='text'>Hanging Together on the SOA Platform - Introduction to the ESB-jBPM Integration</title><content type='html'>One of the great strengths of the SOA Platform is its wealth of software integrations. In this post, I'll examine the JBoss ESB - jBPM integration in the SOA Platform and how it can be used to connect business processes to services.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;JBosssESB&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Service Oriented Architecture (SOA) is not a single program or technology. It’s really a matter of software architecture or design. In hardware terms, a “bus” is a physical connector that ties together multiple systems or subsystems. Instead of having a large number of point-to-point connectors between pairs of systems, you connect each system to the bus once. An Enterprise Service Bus (ESB) does the same thing, logically, in software.&lt;br /&gt;&lt;br /&gt;Instead of passing electric current or data over the bus to and from the connections (or “endpoints”) on the ESB, the ESB logically sits in the architectural layer above a messaging system. The messaging system allows for asynchronous communications between services over the ESB. In fact, when you are working with an ESB, everything is either a service (which in this context is your application software) or a message being sent between services. It’s important to note that a “service” is not automatically a web service. Other types of applications, using transports such as FTP or JMS, can also be services. Is an ESB the same thing as SOA? (Service Oriented Architecture) Not exactly. An ESB does not provide a Service Oriented Architecture, but it does provide the tools than can be used to build one–especially loose-coupling and asynchronous message passing. SOA is a series of principles, patterns, and best practices.&lt;br /&gt;&lt;br /&gt;JBossESB [2] is an open source ESB implementation that supports multiple transports, protocols, a listener-action model for loose coupling of services, content based routing with JBoss Rules (Drools), and workflow management with jBPM.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;JBoss jBPM&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Business process management (BPM) is an often misused or misunderstood term.[3] There are many definitions for BPM, but the best and simplest that I can think of is that it is a systematic approach to improving business processes. What's a business process? It's important for us to understand that in this context, a "process" is not an instance of a running software program, such as the set of processes that are displayed when you type "ps" on a Unix system. In this context, a business process is the set of tasks that are performed by the systems AND the people in an organization in order to achieve that organization's goals. For example, some business processes for an insurance company would be determining risk for selling hurricane insurance in the south eastern USA, preparing actuarial tables for different demographic groups, or deciding on which pieces of junk mail to send to other demographic groups. These processes can be performed by a person, groups of people acting together, people and software services working together, or groups of services working together.&lt;br /&gt;&lt;br /&gt;JBoss jBPM [4] is an open source business process management development environment and workflow management system. jBPM includes: a process definition language (jPDL) that combines Java and process definition, a graphical process design tool (GPD) that is implemented as an eclipse plugin, a process engine runtime (deployed to an application server) that supports long-running tasks in business processes, and a web-based console for end users to access the business process' supporting application. The GPD enables users to create process definitions by manipulating a graphic representation of the process.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_Wad47xG7w3A/SjZgNowbE7I/AAAAAAAAAUk/fmAl6Ngq9EQ/s1600-h/image_1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 280px;" src="http://2.bp.blogspot.com/_Wad47xG7w3A/SjZgNowbE7I/AAAAAAAAAUk/fmAl6Ngq9EQ/s400/image_1.jpg" alt="" id="BLOGGER_PHOTO_ID_5347567394944127922" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;A business process definition as defined in jPDL and represented in a graph in the GPD consists of multiple types of nodes that can represent tasks or a state in the process, actions which are Java code that is executed when events happen in the process, and transitions between nodes.&lt;br /&gt;&lt;br /&gt;It's important to note the importance of state and waiting as supported by jBPM. In a long-running business process, where actions are performed by people and systems, it's often the case that the application program that supports the process has to wait for a person to do something. For example, if the process governs a company's purchasing department, the process may have to pause and wait for a person to manually approve a large purchase. Typically, when you write an application, you want function #1 to call function #2 and so on without introducing wait times. Bur, what if your application has to wait for a person to review some information and do something? We'll walk through an example of how jBPM handles waiting later on in this post. The JBossESB - jBPM integration also enables you to to "orchestrate" ESB services by invoking those services from a process definition. In this context, "orchestration" refers to combining services into a greater whole (application) while retaining some central control. Sort of like how an orchestra is comprised of many different instruments, all under the leadership of a conductor. In contrast, service "choreography" is more in the form of a collection of equal peers or partners.&lt;br /&gt;&lt;br /&gt;In reviewing the JBossESB - jBPM integration, the three topics to consider are:&lt;br /&gt;&lt;br /&gt; * Making Calls From the ESB to the process definition in jBPM&lt;br /&gt; * Orchestrating ESB Services From jBPM to the ESB&lt;br /&gt; * Exception Handling&lt;br /&gt;&lt;br /&gt;&lt;b&gt;JBossESB and jBPM Integration - Making Calls From the ESB to jBPM&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Calls from the JBoss ESB into jBPM use the BpmProcessor action. This action actually uses the jBPM command API [5] to execute the calls into jBPM. Of the commands in the command API, the following (3) are available for use from ESB:&lt;br /&gt;&lt;br /&gt;NewProcessInstanceCommand creates a new ProcessInstance using a process definition that has already been deployed to jBPM. The process instance is left in the start state so that tasks referenced by start node are executed.&lt;br /&gt;&lt;br /&gt;StartProcessInstanceCommand is the same as NewProcessInstanceCommand, except that the process instance that is created is moved from the start position to the first node in the process graph.&lt;br /&gt;&lt;br /&gt;As its name implies, CancelProcessInstanceCommand cancels a process instance.&lt;br /&gt;&lt;br /&gt;All of these commands requires ESB action attributes such as process ID to be defined. The action definitions can also specify additional information in action configuration properties. For example, the "esbToBpmVars" property defines the variables that are to be extracted from the message from the ESB and set in the jBPM context. We'll look at this property when we examine a JBossESB-jPBM quickstart later in this post.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;JBossESB and jBPM Integration - Orchestrating ESB Services from jBPM&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Remember how we described jBPM actions as Java code that is executed when selected events happen in the business process? Well, the ESB-jBPM integration handles orchestrating ESB services from a jBPM process with the EsbActionHandler and EsbNotifier action classes. The classes are similar in that they each send a message to the target ESB service. (Don't forget that in the ESB, everything is either a message or a service.) Where they differ is that the EsbActionHandler class blocks the process and waits for a response to the message that it sends to the service. The EsbNotifier follows an asynchronous model and does not block the process and wait for a response.&lt;br /&gt;&lt;br /&gt;How are EsbActionHandler and EsbNotifier action classes used? Since the EsbNotifier does not wait for a response to the message that it sends to a service, it should be attached to a jBPM process node's outgoing transition. This will allow the jBPM process to proceed while the message (request) sent to the target ESB service can be processed by a different thread. The EsbActionHandler, in contrast, uses a request/response asynchronous model and should be attached to a jBPM process node. When the EsbActionHandler is called, the node that is attached to waits for it to respond with a transition signal. When the node receives this signal, usually from the JBossESB callback service, the jBPM process can then continue.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;JBossESB and jBPM Integration - Exception Handling - When Something Goes Wrong&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;A common source of problems in when you integrate products together is handling errors. In the JBossESB-jBPM integration, exceptions are handled in different ways, depending on whether a message is being passed from the ESB to jBPM, or from jBPM to the ESB.&lt;br /&gt;&lt;br /&gt;JBossESB to jBPM exception handling is the simpler of the two. The jBPM command API (remember that the integration includes these 3 API calls:  NewProcessInstanceCommand, StartProcessInstanceCommand, and CancelProcessInstanceCommand) an throw a JbpmException. The exception is not caught by the integration, but rather it goes to the ESB action pipeline, which sends the letter to the DeadLetterService and logs the message. An error message can also be sent to the ESB faultTo EPR if that property is set on the message. You define the handling of the exception by configuring an aptly-named ExceptionHandler to the jBPM process node.&lt;br /&gt;&lt;br /&gt;jBPM to JBossESB exception handling is more complicated. If the delivery of the message to the ESB fails, then a MessageDeliveryException is thrown by the ESB ServiceInvoker. Both the EsbActionHandler and EsbNotifier actions can throw this type of exception. If the message is received by the target ESB service, but then a failure happens when it is being processed by the service, then what happens to the exception depends on whether we used an EsbActionHandler or EsbNotifier action. Remember that an EsbNotifier does not wait for a response to the message that it sends to a service. Instead, the jBPM business process continues after the message is sent to the ESB service. So, for an EsbNotifier action, the exception is not sent back to the jBPM process. If, however, an EsbActionHandler was used to send the message to the ESB service, then the jBPM business process is waiting for a response. You define the handling of the exception with a jBPM exception-transition for the EsbActionHandler.&lt;br /&gt;&lt;br /&gt;Let's look at this integration in action by examining one of the JBossESB-jBPM  quickstarts. The quickstart programs that ship with JBossESB are a great resource for learning about how to use the ESB and its integrations. At first glance, these programs may look like simple examples. But, they are much more than that. They are an extensive set of well documented models of working code that you can use as the starting point for writing your own SOA applications.&lt;br /&gt;&lt;br /&gt;Before we examine the quickstart, we have one more setup task to perform. Now, we can run the quickstart with ESB alone installed, but anytime that you work with jBPM, you really have to look at the Graphic Process Design (GPD) tool. One of the most useful and instantly recognizable features of jBPM is how it enables you to construct a visual (graphic) representation of your business process. The process is defined in a file named "processdefinition.xml" You can always view and edit the process definition in the XML source, but its much easier to do so with the GPD.&lt;br /&gt;&lt;br /&gt;The quickstart that we'll look at is bpm_orchestration2. This quickstart illustrates how jBPM can control a business process that executes multiple JBoss ESB processes. This quickstart makes use of synchronous calls from jBPM into the JBoss ESB processes. Let's start by looking at the quickstart's source code and its process diagram. To begin, import the quickstart as an existing project into your  workspace in JBoss Developer Studio (JBDS). After the project is created, open the processdefinition.xml file to view the process design in the GPD.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_Wad47xG7w3A/SjZgNowbE7I/AAAAAAAAAUk/fmAl6Ngq9EQ/s1600-h/image_1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 280px;" src="http://2.bp.blogspot.com/_Wad47xG7w3A/SjZgNowbE7I/AAAAAAAAAUk/fmAl6Ngq9EQ/s400/image_1.jpg" alt="" id="BLOGGER_PHOTO_ID_5347567394944127922" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;One thing that you should remember when you view the process design in the GPD is that you are not looking at a static picture of the process. What you are looking at is a dynamic graphic representation of the process. Any changes that you make to the process in the GPD are reflected in the process definition source.&lt;br /&gt;&lt;br /&gt;As I mentioned a minute ago, the bpm_orchestration2 quickstart demonstrates jBPM controlling the execution of JBossESB processes. The quickstart does this by simulating a purchase order placement and approval process. Let's examine just how this happens. To do this, we'll look at two files in the quickstart; processdefinition.xml and the JBoss ESB configuration file, jboss-esb.xml file:&lt;br /&gt;&lt;br /&gt;jboss-esb.xml, lines 74-82:&lt;pre&gt;&lt;br /&gt;      &amp;lt;action  name="start_a_new_process_instance"&lt;br /&gt;                 class="org.jboss.soa.esb.services.jbpm.actions.BpmProcessor"&amp;gt;&lt;br /&gt;                  &amp;lt;property name="command" value="StartProcessInstanceCommand" /&amp;gt;&lt;br /&gt;                  &amp;lt;property name="process-definition-name" value="bpm_orchestration2Process"/&amp;gt;&lt;br /&gt;                   &amp;lt;property name="esbToBpmVars"&amp;gt;&lt;br /&gt;                      &amp;lt;mapping esb="eVar1" bpm="counter"  value="45" /&amp;gt;&lt;br /&gt;                      &amp;lt;mapping esb="BODY_CONTENT" bpm="theBody" /&amp;gt;&lt;br /&gt;                  &amp;lt;/property&amp;gt;&lt;br /&gt;      &amp;lt;/action&amp;gt;&lt;/pre&gt;&lt;br /&gt;The execution of this quickstart, like almost all of the JBossESB quickstarts, is started when a message is received by a listener defined in the ESB. In this quickstart, when that message is received by the listener, a jBPM process is started and moved from the start position to the first node in the process graph when the StartProcessInstanceCommand jBPM API call is executed.&lt;br /&gt;&lt;br /&gt;At this point, let's switch over the the processdefinition.xml to see what happens in the start node. Open the processdefinition.xml file and switch to the "source"  tab.&lt;br /&gt;&lt;br /&gt;processdefinition.xml, lines 5-21&lt;br /&gt;&lt;pre&gt;   &amp;lt;start-state name="start"&amp;gt;&lt;br /&gt;    &amp;lt;transition name="" to="Receive Order"&amp;gt;&amp;lt;/transition&amp;gt;&lt;br /&gt; &amp;lt;/start-state&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;node name="Receive Order"&amp;gt;&lt;br /&gt;       &amp;lt;action name="esbAction" class="org.jboss.soa.esb.services.jbpm.actionhandlers.EsbActionHandler"&amp;gt;&lt;br /&gt;          &amp;lt;esbCategoryName&amp;gt;BPM_Orchestration2_Service1&amp;lt;/esbCategoryName&amp;gt;&lt;br /&gt;          &amp;lt;esbServiceName&amp;gt;Service1&amp;lt;/esbServiceName&amp;gt;&lt;br /&gt;          &amp;lt;bpmToEsbVars&amp;gt;&lt;br /&gt;              &amp;lt;mapping bpm="theBody" esb="BODY_CONTENT" /&amp;gt;&lt;br /&gt;          &amp;lt;/bpmToEsbVars&amp;gt;&lt;br /&gt;          &amp;lt;esbToBpmVars&amp;gt;&lt;br /&gt;              &amp;lt;mapping esb="BODY_CONTENT" bpm="theBody" /&amp;gt;&lt;br /&gt;          &amp;lt;/esbToBpmVars&amp;gt;&lt;br /&gt;       &amp;lt;/action&amp;gt;&lt;br /&gt;      &amp;lt;transition to="Credit Check"&amp;gt;&amp;lt;/transition&amp;gt;&lt;br /&gt;  &amp;lt;/node&amp;gt;&lt;/pre&gt;&lt;br /&gt;The start node simply transitions to the "Receive Order" node. This node defines an action using the EsbActionHandler action class. This tells us that the invocation of the action is synchronous in nature and that the jBPM process will wait for the service referenced in the action (in this case, the service named "Service1") to complete before the jBPM process continues. The rest of the quickstart continues this pattern where the jBPM process executes actions that in turn invoke JBossESB services in a synchronous manner.&lt;br /&gt;&lt;br /&gt;At this point, let's run the quickstart and see what happens. To do this, the steps are:&lt;br /&gt;&lt;br /&gt;Deploy the JBoss ESB archive (/build/Quickstart_bpm_orchestration2.esb) - to do this, execute "ant deploy"&lt;br /&gt;Deploy the jBPM process archive (the contents of the /processDefinition directory) - to do this, execute "ant deployProcess"&lt;br /&gt;Start the process - to do this, execute "ant startProcess"&lt;br /&gt;&lt;br /&gt;After the process is started, you should see this in the server log:&lt;br /&gt;&lt;pre&gt;20:04:36,886 INFO  [STDOUT] ** Begin Receive Order - Service 1 **&lt;br /&gt;20:04:37,399 INFO  [STDOUT] In: Getting Started&lt;br /&gt;20:04:37,400 INFO  [STDOUT] Out: Getting Started 'Receive Order'&lt;br /&gt;20:04:37,400 INFO  [STDOUT] ** End Receive Order - Service 1 **&lt;br /&gt;20:04:38,952 INFO  [STDOUT] ** Begin Credit Check - Service 3 **&lt;br /&gt;20:04:38,952 INFO  [STDOUT] In: Getting Started 'Receive Order'&lt;br /&gt;20:04:38,953 INFO  [STDOUT] Out: Getting Started 'Receive Order'  'Credit Check'&lt;br /&gt;20:04:38,953 INFO  [STDOUT] ** End Credit Check - Service 3 **&lt;br /&gt;20:04:40,443 INFO  [STDOUT] ** Begin Validate Order - Service 2 **&lt;br /&gt;20:04:40,444 INFO  [STDOUT] In: Getting Started 'Receive Order'  'Credit Check'&lt;br /&gt;20:04:40,444 INFO  [STDOUT] Out: Getting Started 'Receive Order'  'Credit Check'  'Validate Order'&lt;br /&gt;20:04:40,444 INFO  [STDOUT] ** End Validate Order - Service 2 **&lt;br /&gt;20:04:42,704 INFO  [STDOUT] ** Begin Inventory Check - Service 4 **&lt;br /&gt;20:04:42,704 INFO  [STDOUT] In: Getting Started 'Receive Order'  'Credit Check'  'Validate Order'&lt;br /&gt;20:04:42,705 INFO  [STDOUT] Out: Getting Started 'Receive Order'  'Credit Check'  'Validate Order'  'Inventory Check'&lt;br /&gt;20:04:42,705 INFO  [STDOUT] ** End Inventory Check - Service 4 **&lt;br /&gt;20:04:45,093 INFO  [STDOUT] ** Begin Los Angeles - Service 5 **&lt;br /&gt;20:04:45,093 INFO  [STDOUT] In: Getting Started 'Receive Order'  'Credit Check'  'Validate Order'  'Inventory Check'&lt;br /&gt;20:04:45,094 INFO  [STDOUT] Out: Getting Started 'Receive Order'  'Credit Check'  'Validate Order'  'Inventory Check'  'Los Angeles'&lt;br /&gt;20:04:45,094 INFO  [STDOUT] ** End Los Angeles - Service 5 **&lt;br /&gt;20:04:45,381 INFO  [STDOUT] ** Begin Atlanta - Service 7 **&lt;br /&gt;20:04:45,382 INFO  [STDOUT] In: Getting Started 'Receive Order'  'Credit Check'  'Validate Order'  'Inventory Check'&lt;br /&gt;20:04:45,382 INFO  [STDOUT] Out: Getting Started 'Receive Order'  'Credit Check'  'Validate Order'  'Inventory Check'  'Atlanta'&lt;br /&gt;20:04:45,382 INFO  [STDOUT] ** End Atlanta - Service 7 **&lt;br /&gt;20:04:45,660 INFO  [STDOUT] ** Begin Dallas - Service 6 **&lt;br /&gt;20:04:45,661 INFO  [STDOUT] In: Getting Started 'Receive Order'  'Credit Check'  'Validate Order'  'Inventory Check'&lt;br /&gt;20:04:45,661 INFO  [STDOUT] Out: Getting Started 'Receive Order'  'Credit Check'  'Validate Order'  'Inventory Check'  'Dallas'&lt;br /&gt;20:04:45,661 INFO  [STDOUT] ** End Dallas - Service 6 **&lt;br /&gt;20:04:49,357 INFO  [STDOUT] ***** Ship It *****&lt;br /&gt;20:04:49,369 INFO  [STDOUT] In: Getting Started 'Receive Order'  'Credit Check'  'Validate Order'  'Inventory Check'&lt;br /&gt;20:04:49,369 INFO  [STDOUT] Out: Getting Started 'Receive Order'  'Credit Check'  'Validate Order'  'Inventory Check'  'Shipped'&lt;br /&gt;20:04:49,370 INFO  [STDOUT] ***** End Ship It *****&lt;br /&gt;20:04:49,392 INFO  [STDOUT] SUCCESS!:&lt;br /&gt;20:04:49,392 INFO  [STDOUT] [Getting Started 'Receive Order'  'Credit Check'  'Validate Order'  'Inventory Check'  'Shipped' ].&lt;/pre&gt;&lt;br /&gt;Now, remember that what's happening is that the jBPM process is invoking a JBossESB service, waiting for the process to complete, and then invoking the next JBossESB services until all the services have been invoked and the jBPM process completes. Hmm. I don't know about you, but since I started working in QE, I've become skeptical of just about anything when it seems to "just work." The JBoss ESB services in this quickstart are implemented in simple groovy scripts. The scripts all run very quickly, so it's a little difficult to verify that the jBPM process is actually waiting for each service to complete before invoking the next service in the sequence defined in processDefinition.xml&lt;br /&gt;&lt;br /&gt;So, let's make the delay to the jBPM process a little more obvious. If we add the following lines to scripts/service1.groovy and then deploy the ESB and jBPM process archive and run the quickstart again, we should see more obvious delay in the log:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;println "Added new println - waiting .........."&lt;br /&gt;for ( i in 0..1000 ) {&lt;br /&gt;  print i + " "&lt;br /&gt;}&lt;br /&gt;println "Added new println - done waiting .........."&lt;/pre&gt;&lt;br /&gt;To make the change effective, execute "ant undeploy" then redeploy the JBossESB archive and jBPM process archive and run the quickstart again. The server log shows:&lt;br /&gt;&lt;pre&gt;21:45:04,966 INFO  [STDOUT] ** End Receive Order - Service 1 **&lt;br /&gt;21:45:04,966 INFO  [STDOUT] Added new println - waiting ..........&lt;br /&gt;21:45:05,105 INFO  [STDOUT] 0&lt;br /&gt;21:45:05,105 INFO  [STDOUT] 1&lt;br /&gt;21:45:05,105 INFO  [STDOUT] 2&lt;br /&gt;21:45:05,106 INFO  [STDOUT] 3&lt;br /&gt;21:45:05,106 INFO  [STDOUT] 4&lt;br /&gt;.&lt;br /&gt;.&lt;br /&gt;.&lt;br /&gt;21:45:05,312 INFO  [STDOUT] 997&lt;br /&gt;21:45:05,312 INFO  [STDOUT] 998&lt;br /&gt;21:45:05,312 INFO  [STDOUT] 999&lt;br /&gt;21:45:05,313 INFO  [STDOUT] 1000&lt;br /&gt;21:45:05,313 INFO  [STDOUT] Added new println - done waiting ..........&lt;/pre&gt;&lt;br /&gt;And then, the rest of the JBossESB services are invoked in sequence, so, yes, the call to the service was synchronous and the process waited for the service to complete before it continued.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Closing Thoughts&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;As we discussed in the introduction to this post, one of the great strengths of the SOA Platform is the set of integrations that it supports. With its integration with jBPM you can combine a service oriented architecture implemented through the ESB with the flexibility of building applications based on your business processes designed with the jBPM graphical process designer. And, by using the JBossESB-jBPM integration, your applications can handle awkward situations where the application has to wait for a service, or a person, to perform an action. (So, unlike what Tom Petty said, waiting is not the hardest part...  ;-)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;References&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;[1] &lt;a href="http://www.ushistory.org/franklin/quotable/quote71.htm"&gt;http://www.ushistory.org/franklin/quotable/quote71.htm&lt;/a&gt;&lt;br /&gt;[2] &lt;a href="http://www.jboss.org/jbossesb/"&gt;http://www.jboss.org/jbossesb/&lt;/a&gt;&lt;br /&gt;[3] Business Process Management definitions: &lt;a href="http://searchcio.techtarget.com/sDefinition/0,,sid182_gci1088464,00.html"&gt;http://searchcio.techtarget.com/sDefinition/0,,sid182_gci1088464,00.html&lt;/a&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Business_process_management"&gt;http://en.wikipedia.org/wiki/Business_process_management&lt;/a&gt;&lt;br /&gt;[4] jBPM: &lt;a href="http://www.jboss.org/jbossjbpm/"&gt;http://www.jboss.org/jbossjbpm/&lt;/a&gt; and the JBossESB jBPM Integration Chapter in the JBoss ESB Services Guide: &lt;a href="http://www.jboss.org/jbossesb/docs/4.5.GA/manuals/html/ServicesGuide.html"&gt;http://www.jboss.org/jbossesb/docs/4.5.GA/manuals/html/ServicesGuide.html&lt;/a&gt;&lt;br /&gt;[5] &lt;a href="http://docs.jboss.com/jbpm/v3.2/javadoc-jpdl/"&gt;http://docs.jboss.com/jbpm/v3.2/javadoc-jpdl/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Acknowledgements&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I want to thank the members of the JBossESB (see http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/Contributors.txt) and jBPM projects and the SOA Platform - especially Burr Sutter, Mark Little, Kurt Stam, and Tom Baeyans - for their help and review comments. Also, this post relies heavily on the extensive JBossESB and jBPM user documents and the quickstarts. (And, I'd also like to thank Bascha Harris for her feedback on the post!)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9094589327053503491-9052784223709750105?l=jboss-soa-p.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jboss-soa-p.blogspot.com/feeds/9052784223709750105/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9094589327053503491&amp;postID=9052784223709750105' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/9052784223709750105'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/9052784223709750105'/><link rel='alternate' type='text/html' href='http://jboss-soa-p.blogspot.com/2009/06/hanging-together-on-soa-platform.html' title='Hanging Together on the SOA Platform - Introduction to the ESB-jBPM Integration'/><author><name>Len DiMaggio</name><uri>http://www.blogger.com/profile/07124585546929851174</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='20' src='http://1.bp.blogspot.com/_Wad47xG7w3A/Sc7b75epEEI/AAAAAAAAAQ4/F9-h0znUI7w/S220/Boston.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_Wad47xG7w3A/SjZgNowbE7I/AAAAAAAAAUk/fmAl6Ngq9EQ/s72-c/image_1.jpg' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9094589327053503491.post-2509017494703249470</id><published>2009-03-05T10:20:00.001-08:00</published><updated>2009-03-05T10:21:09.972-08:00</updated><title type='text'>SOA Platform Talk At SOA Symposium</title><content type='html'>I'm talking about &lt;a href="http://soasymposium.com/conference_agenda2.asp"&gt;Open Source and SOA at the SOA Symposium on Government and Industry Best Practices&lt;/a&gt;. Come along if you get a chance.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9094589327053503491-2509017494703249470?l=jboss-soa-p.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jboss-soa-p.blogspot.com/feeds/2509017494703249470/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9094589327053503491&amp;postID=2509017494703249470' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/2509017494703249470'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/2509017494703249470'/><link rel='alternate' type='text/html' href='http://jboss-soa-p.blogspot.com/2009/03/soa-platform-talk-at-soa-symposium.html' title='SOA Platform Talk At SOA Symposium'/><author><name>Mark Little</name><uri>http://www.blogger.com/profile/15072917010265365428</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9094589327053503491.post-5634438411377748193</id><published>2009-02-24T05:53:00.000-08:00</published><updated>2009-02-24T05:55:49.364-08:00</updated><title type='text'>SOA Patterns podcast</title><content type='html'>&lt;a href="http://www.informit.com/podcasts/episode.aspx?e=ff4c8bed-3552-4e2c-a3ed-28c5039e2da5"&gt;I did a podcast&lt;/a&gt; with &lt;a href="http://markclittle.blogspot.com/2009/01/soa-design-patterns-released.html"&gt;one of my ESB/SOA book co-authors to publicize the work we did with Thomas Erl around the SOA Patterns book&lt;/a&gt;. I can't remember what we discussed, but I'm sure it's interesting ;-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9094589327053503491-5634438411377748193?l=jboss-soa-p.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jboss-soa-p.blogspot.com/feeds/5634438411377748193/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9094589327053503491&amp;postID=5634438411377748193' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/5634438411377748193'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/5634438411377748193'/><link rel='alternate' type='text/html' href='http://jboss-soa-p.blogspot.com/2009/02/soa-patterns-podcast.html' title='SOA Patterns podcast'/><author><name>Mark Little</name><uri>http://www.blogger.com/profile/15072917010265365428</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9094589327053503491.post-49489203508958688</id><published>2009-02-09T12:51:00.000-08:00</published><updated>2009-02-09T13:09:21.381-08:00</updated><title type='text'>ESB Architecture for SOA</title><content type='html'>&lt;a href="http://markclittle.blogspot.com/2007/09/vacation-contracts-annotations-papers.html"&gt;I've been writing a book on ESB and SOA&lt;/a&gt; for a while now as part of &lt;a href="http://www.soabooks.com/"&gt;Thomas Erl's SOA series&lt;/a&gt;. The publishers &lt;a href="http://www.soabooks.com/book.asp?book=esb_architecture&amp;page=overview"&gt;have finally put up a page for the book&lt;/a&gt;. From my own perspective the content of the book is influenced heavily by what you will find in the &lt;a href="http://www.jboss.com/pdf/JESP43WhatsNew.pdf"&gt;JBoss SOA Platform&lt;/a&gt; and its roadmap. Of course it's not a technology specific book because it needs to be able to stand on its own, so it is no replacement for &lt;a href="http://www.redhat.com/docs/en-US/JBoss_SOA_Platform/"&gt;the SOA-P documentation&lt;/a&gt;. However, you should be able to read it and think "Ah, now that makes sense &lt;a href="http://www.webservices.org/weblog/mark_little/next_stop_the_twilight_zone"&gt;from a standards perspective&lt;/a&gt;", or "OK, so I'd be better of using &lt;a href="http://jbossesb.blogspot.com/2009/01/soa-design-patterns.html"&gt;this pattern&lt;/a&gt; here".&lt;br /&gt;&lt;br /&gt;When the book is finally released we'll make sure to mention it here. In the meantime you can always go out and get &lt;a href="http://www.amazon.com/Enterprise-Service-Oriented-Architectures-Recommendations/dp/140203704X/ref=sr_1_10?ie=UTF8&amp;s=books&amp;qid=1234213588&amp;sr=8-10"&gt;another good book on enterprise SOA&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9094589327053503491-49489203508958688?l=jboss-soa-p.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jboss-soa-p.blogspot.com/feeds/49489203508958688/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9094589327053503491&amp;postID=49489203508958688' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/49489203508958688'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/49489203508958688'/><link rel='alternate' type='text/html' href='http://jboss-soa-p.blogspot.com/2009/02/esb-architecture-for-soa.html' title='ESB Architecture for SOA'/><author><name>Mark Little</name><uri>http://www.blogger.com/profile/15072917010265365428</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9094589327053503491.post-3769041788272411410</id><published>2009-01-18T12:24:00.000-08:00</published><updated>2009-01-18T12:33:10.123-08:00</updated><title type='text'>Dog food tastes good!</title><content type='html'>We've &lt;a href="http://www.jboss.com/resources/soa/successstories"&gt;got quite a few success stories&lt;/a&gt; referenced on the &lt;a href="http://www.jboss.com/resources/soa"&gt;SOA Resource Center&lt;/a&gt;. There are more in the works, but if you've ever worked on success stories before you'll know that writing them up is often difficult for a number of reasons, e.g., they can't be too technical and companies are often concerned about divulging internal secrets.&lt;br /&gt;&lt;br /&gt;Anyway that's not the point of this posting: we're working on a couple of success stories that are based on our own internal use of the SOA Platform. Of course external readers will view these as slightly less important than "real" customers, but to be honest I think that's a bad thing. If anything they show our commitment to &lt;a href="http://idioms.thefreedictionary.com/put+money+where+mouth+is"&gt;'put our money where our mouth is'&lt;/a&gt;. In each case we've taken critical systems that have been running continuously for years based on competitor technologies and replaced them with our own products. It may seem like an obvious thing to do, but you'd be surprised how many companies don't do that. The feedback we've had from those development teams has been extremely positive and hopefully I'll be able to point at the relevant success story soon. Congratulations to everyone involved!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9094589327053503491-3769041788272411410?l=jboss-soa-p.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jboss-soa-p.blogspot.com/feeds/3769041788272411410/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9094589327053503491&amp;postID=3769041788272411410' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/3769041788272411410'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/3769041788272411410'/><link rel='alternate' type='text/html' href='http://jboss-soa-p.blogspot.com/2009/01/dog-food-tastes-good.html' title='Dog food tastes good!'/><author><name>Mark Little</name><uri>http://www.blogger.com/profile/15072917010265365428</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9094589327053503491.post-2913477104111240648</id><published>2009-01-18T12:17:00.001-08:00</published><updated>2009-01-18T12:18:04.195-08:00</updated><title type='text'>SOA Design Patterns</title><content type='html'>I've been writing a book on SOA and ESB for a while with a couple of friends. It's due to be part of Thomas Erl's SOA series later this year. While writing it &lt;a href="http://www.soapatterns.org/background.asp"&gt;Thomas asked us to produce some patterns for his book&lt;/a&gt; on SOA. Well the finished book, &lt;a href="http://www.amazon.com/Design-Patterns-Prentice-Service-Oriented-Computing/dp/0136135161"&gt;SOA Design Patterns&lt;/a&gt;, is now out and it's well worth a read. &lt;a href="http://blogs.oracle.com/davidchappell/2009/01/new_soa_patterns_book_by_thoma.html"&gt;A number of people throughout the industry&lt;/a&gt; have helped to contribute some of the patterns within it so this is definitely a cross-industry collaborative effort. Thomas also wants it to be a &lt;a href="http://www.soapatterns.org/"&gt;live-work in as much as new patterns can be contributed by anyone&lt;/a&gt;. So take a look at the book and if you see something missing consider contributing it. Many of the patterns are influenced by our work with the JBoss SOA Platform.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9094589327053503491-2913477104111240648?l=jboss-soa-p.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jboss-soa-p.blogspot.com/feeds/2913477104111240648/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9094589327053503491&amp;postID=2913477104111240648' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/2913477104111240648'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/2913477104111240648'/><link rel='alternate' type='text/html' href='http://jboss-soa-p.blogspot.com/2009/01/soa-design-patterns.html' title='SOA Design Patterns'/><author><name>Mark Little</name><uri>http://www.blogger.com/profile/15072917010265365428</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9094589327053503491.post-3568905591627510917</id><published>2008-10-31T01:16:00.000-07:00</published><updated>2008-11-09T10:25:55.012-08:00</updated><title type='text'>SOA Platform 4.3 released</title><content type='html'>We're pleased to announce that &lt;a href="http://www.redhat.com/jboss/platforms/soa/"&gt;version 4.3 of our SOA Platform&lt;/a&gt; has just been released. We've made quite a few improvements since the &lt;a href="http://www.redhat.com/about/news/prarchive/2008/jboss_soa.html"&gt;first release&lt;/a&gt;, including &lt;a href="http://www.redhat.com/about/news/prarchive/2008/SOA_JON.html"&gt;closer integration with JON&lt;/a&gt; to provide runtime governance of services, more transport support, performance improvements etc. There's a &lt;a href="http://www.jboss.com/pdf/JESP43WhatsNew.pdf"&gt;white paper&lt;/a&gt; that goes into some detail on a few of the key improvements we've made, so check it out. Since the first release of the platform earlier this year, we've been working closely with customers and the community to ensure that this release is more than just a delta over the last. Of course we're not finished, but if the last year has been anything to go by this definitely going to be an adventure people will want to be involved with!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9094589327053503491-3568905591627510917?l=jboss-soa-p.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jboss-soa-p.blogspot.com/feeds/3568905591627510917/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9094589327053503491&amp;postID=3568905591627510917' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/3568905591627510917'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/3568905591627510917'/><link rel='alternate' type='text/html' href='http://jboss-soa-p.blogspot.com/2008/10/soa-platform-43-released.html' title='SOA Platform 4.3 released'/><author><name>Mark Little</name><uri>http://www.blogger.com/profile/15072917010265365428</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9094589327053503491.post-7087180140459951286</id><published>2008-07-15T05:43:00.001-07:00</published><updated>2008-07-15T05:43:33.226-07:00</updated><title type='text'>Red Hat and SOA Platform in the news.</title><content type='html'>Only a week late, but &lt;a href="http://searchenterpriselinux.techtarget.com/news/article/0,289142,sid39_gci1320335,00.html?track=NL-795&amp;ad=650387&amp;asrc=EM_NLN_3988778&amp;uid=5731537"&gt;worth a look&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9094589327053503491-7087180140459951286?l=jboss-soa-p.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jboss-soa-p.blogspot.com/feeds/7087180140459951286/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9094589327053503491&amp;postID=7087180140459951286' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/7087180140459951286'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9094589327053503491/posts/default/7087180140459951286'/><link rel='alternate' type='text/html' href='http://jboss-soa-p.blogspot.com/2008/07/red-hat-and-soa-platform-in-news.html' title='Red Hat and SOA Platform in the news.'/><author><name>Mark Little</name><uri>http://www.blogger.com/profile/15072917010265365428</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
