[jboss-svn-commits] JBL Code SVN: r8263 - in labs/jbossesb/trunk/product/samples: . trailblazer trailblazer/banks trailblazer/banks/lib trailblazer/banks/lib/ext trailblazer/banks/src trailblazer/banks/src/org trailblazer/banks/src/org/jboss trailblazer/banks/src/org/jboss/soa trailblazer/banks/src/org/jboss/soa/esb trailblazer/banks/src/org/jboss/soa/esb/samples trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks trailblazer/banks/test trailblazer/banks/test/src trailblazer/banks/test/src/org trailblazer/banks/test/src/org/jboss trailblazer/banks/test/src/org/jboss/soa trailblazer/banks/test/src/org/jboss/soa/esb trailblazer/banks/test/src/org/jboss/soa/esb/samples trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker/banks trailblazer/client trailblazer/client/jsp trailblazer/client/lib trailblazer/client/lib/ext trailblazer/client/resourc! es trailblazer/client/src trailblazer/client/src/org trailblazer/client/src/org/jboss trailblazer/client/src/org/jboss/soa trailblazer/client/src/org/jboss/soa/esb trailblazer/client/src/org/jboss/soa/esb/samples trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated trailblazer/docs trailblazer/esb trailblazer/esb/conf trailblazer/esb/lib trailblazer/esb/lib/ext trailblazer/esb/src trailblazer/esb/src/org trailblazer/esb/src/org/jboss trailblazer/esb/src/org/jboss/soa trailblazer/esb/src/org/jboss/soa/esb trailblazer/esb/src/org/jboss/soa/esb/samples trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/actions trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/util trailblazer/esb/test trai! lblazer/loanbroker trailblazer/loanbroker/lib trailblazer/loanbroker/test trailblazer/template

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue Dec 12 12:53:27 EST 2006


Author: daniel.brum at jboss.com
Date: 2006-12-12 12:51:58 -0500 (Tue, 12 Dec 2006)
New Revision: 8263

Added:
   labs/jbossesb/trunk/product/samples/trailblazer/
   labs/jbossesb/trunk/product/samples/trailblazer/banks/
   labs/jbossesb/trunk/product/samples/trailblazer/banks/JBoss ESB Loan Broker Banks Guide.doc
   labs/jbossesb/trunk/product/samples/trailblazer/banks/JBoss ESB Loan Broker Banks Guide.html
   labs/jbossesb/trunk/product/samples/trailblazer/banks/bank.properties
   labs/jbossesb/trunk/product/samples/trailblazer/banks/bank.properties.template
   labs/jbossesb/trunk/product/samples/trailblazer/banks/build.xml
   labs/jbossesb/trunk/product/samples/trailblazer/banks/lib/
   labs/jbossesb/trunk/product/samples/trailblazer/banks/lib/ext/
   labs/jbossesb/trunk/product/samples/trailblazer/banks/lib/ext/Licenses.txt
   labs/jbossesb/trunk/product/samples/trailblazer/banks/lib/ext/org.sadun.util.jar
   labs/jbossesb/trunk/product/samples/trailblazer/banks/lib/ext/pollmgt.jar
   labs/jbossesb/trunk/product/samples/trailblazer/banks/log4j.xml
   labs/jbossesb/trunk/product/samples/trailblazer/banks/monitored_folders/
   labs/jbossesb/trunk/product/samples/trailblazer/banks/src/
   labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/
   labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/
   labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/
   labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/
   labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/
   labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/
   labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/
   labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/Bank.java
   labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/BankQuoteReply.java
   labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/BankQuoteRequest.java
   labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/FileUtil.java
   labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/ManagerFlatFile.java
   labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/ManagerJMS.java
   labs/jbossesb/trunk/product/samples/trailblazer/banks/test/
   labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/
   labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/
   labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/
   labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/
   labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/
   labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/samples/
   labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker/
   labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker/banks/
   labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker/banks/BankQuoteReplyTest.java
   labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker/banks/BankQuoteRequestTest.java
   labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker/banks/BankTest.java
   labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker/banks/FlatFileProcessorTest.java
   labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker/banks/JmsProcessorTest.java
   labs/jbossesb/trunk/product/samples/trailblazer/build.properties
   labs/jbossesb/trunk/product/samples/trailblazer/build.xml
   labs/jbossesb/trunk/product/samples/trailblazer/client/
   labs/jbossesb/trunk/product/samples/trailblazer/client/jsp/
   labs/jbossesb/trunk/product/samples/trailblazer/client/jsp/index.jsp
   labs/jbossesb/trunk/product/samples/trailblazer/client/lib/
   labs/jbossesb/trunk/product/samples/trailblazer/client/lib/ext/
   labs/jbossesb/trunk/product/samples/trailblazer/client/lib/ext/Licenses.txt
   labs/jbossesb/trunk/product/samples/trailblazer/client/lib/ext/axis.jar
   labs/jbossesb/trunk/product/samples/trailblazer/client/lib/ext/commons-discovery.jar
   labs/jbossesb/trunk/product/samples/trailblazer/client/lib/ext/milyn-smooks-csv-0.1.jar
   labs/jbossesb/trunk/product/samples/trailblazer/client/lib/ext/opencsv-1.6.jar
   labs/jbossesb/trunk/product/samples/trailblazer/client/resources/
   labs/jbossesb/trunk/product/samples/trailblazer/client/resources/LoanBrokerWS-wsdl
   labs/jbossesb/trunk/product/samples/trailblazer/client/resources/LoanBrokerWS-wsdl.xml
   labs/jbossesb/trunk/product/samples/trailblazer/client/resources/LoanBrokerWS.wsdl
   labs/jbossesb/trunk/product/samples/trailblazer/client/resources/from__loanbroker.cdrl
   labs/jbossesb/trunk/product/samples/trailblazer/client/resources/jboss-web.xml
   labs/jbossesb/trunk/product/samples/trailblazer/client/resources/smooks-cdr.lst
   labs/jbossesb/trunk/product/samples/trailblazer/client/resources/to____jmsbank.cdrl
   labs/jbossesb/trunk/product/samples/trailblazer/client/resources/web.xml
   labs/jbossesb/trunk/product/samples/trailblazer/client/src/
   labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/
   labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/
   labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/
   labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/
   labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/
   labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/
   labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/
   labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/Customer.java
   labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/CustomerMasterFile.java
   labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/LoanBroker.java
   labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/QuoteRequest.java
   labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/SendJMSMessage.java
   labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/
   labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/LoanBrokerWS.java
   labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/WebCustomer.java
   labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/
   labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/LoanBrokerWS.java
   labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/LoanBrokerWSBindingStub.java
   labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/LoanBrokerWSProxy.java
   labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/LoanBrokerWSService.java
   labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/LoanBrokerWSServiceLocator.java
   labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/WebCustomer.java
   labs/jbossesb/trunk/product/samples/trailblazer/docs/
   labs/jbossesb/trunk/product/samples/trailblazer/docs/sequence-diagram-overview.pdf
   labs/jbossesb/trunk/product/samples/trailblazer/esb-quickstart-service.xml
   labs/jbossesb/trunk/product/samples/trailblazer/esb/
   labs/jbossesb/trunk/product/samples/trailblazer/esb/build.xml
   labs/jbossesb/trunk/product/samples/trailblazer/esb/conf/
   labs/jbossesb/trunk/product/samples/trailblazer/esb/conf/jbossesb-gateway.xml
   labs/jbossesb/trunk/product/samples/trailblazer/esb/conf/jbossesb-listener.xml
   labs/jbossesb/trunk/product/samples/trailblazer/esb/lib/
   labs/jbossesb/trunk/product/samples/trailblazer/esb/lib/ext/
   labs/jbossesb/trunk/product/samples/trailblazer/esb/lib/ext/c3p0-0.9.1-pre9.jar
   labs/jbossesb/trunk/product/samples/trailblazer/esb/lib/ext/commons-logging.jar
   labs/jbossesb/trunk/product/samples/trailblazer/esb/lib/ext/hsqldb.jar
   labs/jbossesb/trunk/product/samples/trailblazer/esb/lib/ext/milyn-smooks-csv-0.1.jar
   labs/jbossesb/trunk/product/samples/trailblazer/esb/lib/ext/opencsv-1.6.jar
   labs/jbossesb/trunk/product/samples/trailblazer/esb/log4j.xml
   labs/jbossesb/trunk/product/samples/trailblazer/esb/src/
   labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/
   labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/
   labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/
   labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/
   labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/
   labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/
   labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/actions/
   labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/actions/BankResponseActions.java
   labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/actions/CreditAgencyActions.java
   labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/util/
   labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/util/HsqldbUtil.java
   labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/util/Launcher.java
   labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/util/ProcessEmail.java
   labs/jbossesb/trunk/product/samples/trailblazer/esb/test/
   labs/jbossesb/trunk/product/samples/trailblazer/esb/test/src/
   labs/jbossesb/trunk/product/samples/trailblazer/jbossesb-properties.xml
   labs/jbossesb/trunk/product/samples/trailblazer/juddi.properties
   labs/jbossesb/trunk/product/samples/trailblazer/loanbroker/
   labs/jbossesb/trunk/product/samples/trailblazer/loanbroker/lib/
   labs/jbossesb/trunk/product/samples/trailblazer/loanbroker/lib/ext/
   labs/jbossesb/trunk/product/samples/trailblazer/loanbroker/src/
   labs/jbossesb/trunk/product/samples/trailblazer/loanbroker/test/
   labs/jbossesb/trunk/product/samples/trailblazer/loanbroker/test/src/
   labs/jbossesb/trunk/product/samples/trailblazer/log4j.xml
   labs/jbossesb/trunk/product/samples/trailblazer/readme.txt
   labs/jbossesb/trunk/product/samples/trailblazer/template/
   labs/jbossesb/trunk/product/samples/trailblazer/template/quote.st
Log:
renaming to trailblazer.  http://jira.jboss.com/jira/browse/JBESB-259

Added: labs/jbossesb/trunk/product/samples/trailblazer/banks/JBoss ESB Loan Broker Banks Guide.doc
===================================================================
(Binary files differ)


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/banks/JBoss ESB Loan Broker Banks Guide.doc
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbossesb/trunk/product/samples/trailblazer/banks/JBoss ESB Loan Broker Banks Guide.html
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/banks/JBoss ESB Loan Broker Banks Guide.html	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/banks/JBoss ESB Loan Broker Banks Guide.html	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,489 @@
+<html xmlns:o="urn:schemas-microsoft-com:office:office"
+xmlns:w="urn:schemas-microsoft-com:office:word"
+xmlns:st1="urn:schemas-microsoft-com:office:smarttags"
+xmlns="http://www.w3.org/TR/REC-html40">
+
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
+<meta name=ProgId content=Word.Document>
+<meta name=Generator content="Microsoft Word 11">
+<meta name=Originator content="Microsoft Word 11">
+<link rel=File-List
+href="JBoss%20ESB%20Loan%20Broker%20Banks%20Guide_files/filelist.xml">
+<title>BANKS FOR THE LOANBROKER DEMO</title>
+<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
+ name="country-region"/>
+<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
+ name="Street"/>
+<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
+ name="address"/>
+<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
+ name="place"/>
+<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
+ name="City"/>
+<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
+ name="State"/>
+<!--[if gte mso 9]><xml>
+ <o:DocumentProperties>
+  <o:Author>kstam</o:Author>
+  <o:LastAuthor>kstam</o:LastAuthor>
+  <o:Revision>2</o:Revision>
+  <o:TotalTime>7</o:TotalTime>
+  <o:Created>2006-08-03T14:42:00Z</o:Created>
+  <o:LastSaved>2006-08-03T14:42:00Z</o:LastSaved>
+  <o:Pages>1</o:Pages>
+  <o:Words>743</o:Words>
+  <o:Characters>4237</o:Characters>
+  <o:Company>JBoss, Inc.</o:Company>
+  <o:Lines>35</o:Lines>
+  <o:Paragraphs>9</o:Paragraphs>
+  <o:CharactersWithSpaces>4971</o:CharactersWithSpaces>
+  <o:Version>11.6568</o:Version>
+ </o:DocumentProperties>
+</xml><![endif]--><!--[if gte mso 9]><xml>
+ <w:WordDocument>
+  <w:SpellingState>Clean</w:SpellingState>
+  <w:GrammarState>Clean</w:GrammarState>
+  <w:PunctuationKerning/>
+  <w:ValidateAgainstSchemas/>
+  <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
+  <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
+  <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
+  <w:Compatibility>
+   <w:BreakWrappedTables/>
+   <w:SnapToGridInCell/>
+   <w:WrapTextWithPunct/>
+   <w:UseAsianBreakRules/>
+   <w:DontGrowAutofit/>
+  </w:Compatibility>
+  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
+ </w:WordDocument>
+</xml><![endif]--><!--[if gte mso 9]><xml>
+ <w:LatentStyles DefLockedState="false" LatentStyleCount="156">
+ </w:LatentStyles>
+</xml><![endif]--><!--[if !mso]><object
+ classid="clsid:38481807-CA0E-42D2-BF39-B33AF135CC4D" id=ieooui></object>
+<style>
+st1\:*{behavior:url(#ieooui) }
+</style>
+<![endif]-->
+<style>
+<!--
+ /* Style Definitions */
+ p.MsoNormal, li.MsoNormal, div.MsoNormal
+	{mso-style-parent:"";
+	margin:0in;
+	margin-bottom:.0001pt;
+	mso-pagination:widow-orphan;
+	font-size:12.0pt;
+	font-family:"Times New Roman";
+	mso-fareast-font-family:"Times New Roman";}
+h1
+	{mso-style-link:"Heading 1 Char";
+	mso-style-next:Normal;
+	margin-top:12.0pt;
+	margin-right:0in;
+	margin-bottom:3.0pt;
+	margin-left:0in;
+	mso-pagination:widow-orphan;
+	page-break-after:avoid;
+	mso-outline-level:1;
+	font-size:16.0pt;
+	font-family:Arial;
+	mso-font-kerning:16.0pt;}
+h2
+	{mso-style-next:Normal;
+	margin-top:12.0pt;
+	margin-right:0in;
+	margin-bottom:3.0pt;
+	margin-left:0in;
+	mso-pagination:widow-orphan;
+	page-break-after:avoid;
+	mso-outline-level:2;
+	font-size:14.0pt;
+	font-family:Arial;
+	font-style:italic;}
+h3
+	{mso-style-next:Normal;
+	margin-top:12.0pt;
+	margin-right:0in;
+	margin-bottom:3.0pt;
+	margin-left:0in;
+	mso-pagination:widow-orphan;
+	page-break-after:avoid;
+	mso-outline-level:3;
+	font-size:13.0pt;
+	font-family:Arial;}
+a:link, span.MsoHyperlink
+	{color:blue;
+	text-decoration:underline;
+	text-underline:single;}
+a:visited, span.MsoHyperlinkFollowed
+	{color:purple;
+	text-decoration:underline;
+	text-underline:single;}
+span.Heading1Char
+	{mso-style-name:"Heading 1 Char";
+	mso-style-locked:yes;
+	mso-style-link:"Heading 1";
+	mso-ansi-font-size:16.0pt;
+	mso-bidi-font-size:16.0pt;
+	font-family:Arial;
+	mso-ascii-font-family:Arial;
+	mso-hansi-font-family:Arial;
+	mso-bidi-font-family:Arial;
+	mso-font-kerning:16.0pt;
+	mso-ansi-language:EN-US;
+	mso-fareast-language:EN-US;
+	mso-bidi-language:AR-SA;
+	font-weight:bold;}
+span.SpellE
+	{mso-style-name:"";
+	mso-spl-e:yes;}
+span.GramE
+	{mso-style-name:"";
+	mso-gram-e:yes;}
+ at page Section1
+	{size:8.5in 11.0in;
+	margin:1.0in 1.25in 1.0in 1.25in;
+	mso-header-margin:.5in;
+	mso-footer-margin:.5in;
+	mso-paper-source:0;}
+div.Section1
+	{page:Section1;}
+-->
+</style>
+<!--[if gte mso 10]>
+<style>
+ /* Style Definitions */
+ table.MsoNormalTable
+	{mso-style-name:"Table Normal";
+	mso-tstyle-rowband-size:0;
+	mso-tstyle-colband-size:0;
+	mso-style-noshow:yes;
+	mso-style-parent:"";
+	mso-padding-alt:0in 5.4pt 0in 5.4pt;
+	mso-para-margin:0in;
+	mso-para-margin-bottom:.0001pt;
+	mso-pagination:widow-orphan;
+	font-size:10.0pt;
+	font-family:"Times New Roman";
+	mso-ansi-language:#0400;
+	mso-fareast-language:#0400;
+	mso-bidi-language:#0400;}
+</style>
+<![endif]-->
+</head>
+
+<body lang=EN-US link=blue vlink=purple style='tab-interval:.5in'>
+
+<div class=Section1>
+
+<h1>JBoss ESB Loan Broker Banks Guide</h1>
+
+<p class=MsoNormal><o:p>&nbsp;</o:p></p>
+
+<p class=MsoNormal>By: Kurt Stam (<a href="mailto:kurt.stam at jboss.com">kurt.stam at jboss.com</a>)</p>
+
+<p class=MsoNormal><o:p>&nbsp;</o:p></p>
+
+<p class=MsoNormal>JBoss ESB JBoss Labs Home Page: <a
+href="http://labs.jboss.com/portal/jbossesb">http://labs.jboss.com/portal/jbossesb</a></p>
+
+<p class=MsoNormal><o:p>&nbsp;</o:p></p>
+
+<p class=MsoNormal>JBoss ESB Developer Community Forums: <a
+href="http://www.jboss.com/index.html?module=bb&amp;op=viewforum&amp;f=220">http://www.jboss.com/index.html?module=bb&amp;op=viewforum&amp;f=220</a></p>
+
+<p class=MsoNormal><o:p>&nbsp;</o:p></p>
+
+<p class=MsoNormal>########################################################################</p>
+
+<p class=MsoNormal># JBoss, Home of Professional Open Source</p>
+
+<p class=MsoNormal># Copyright 2006, JBoss Inc., and individual contributors as
+indicated</p>
+
+<p class=MsoNormal># <span class=GramE>by</span> the @authors tag. See the
+copyright.txt in the distribution for a</p>
+
+<p class=MsoNormal># <span class=GramE>full</span> listing of individual
+contributors.</p>
+
+<p class=MsoNormal>#</p>
+
+<p class=MsoNormal># <span class=GramE>This</span> is free software; you can
+redistribute it and/or modify it</p>
+
+<p class=MsoNormal># <span class=GramE>under</span> the terms of the GNU Lesser
+General Public License as</p>
+
+<p class=MsoNormal># published by the Free Software Foundation; either version
+2.1 of</p>
+
+<p class=MsoNormal># <span class=GramE>the</span> License, or (at your option)
+any later version.</p>
+
+<p class=MsoNormal>#</p>
+
+<p class=MsoNormal># <span class=GramE>This</span> software is distributed in
+the hope that it will be useful,</p>
+
+<p class=MsoNormal># <span class=GramE>but</span> WITHOUT ANY WARRANTY; without
+even the implied warranty of</p>
+
+<p class=MsoNormal><span class=GramE># MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE.</span> See the GNU</p>
+
+<p class=MsoNormal><span class=GramE># Lesser General Public License for more
+details.</span></p>
+
+<p class=MsoNormal>#</p>
+
+<p class=MsoNormal># <span class=GramE>You</span> should have received a copy
+of the GNU Lesser General Public</p>
+
+<p class=MsoNormal># License along with this software; if not, write to the
+Free</p>
+
+<p class=MsoNormal># Software Foundation, Inc., <st1:Street w:st="on"><st1:address
+ w:st="on">51 Franklin St</st1:address></st1:Street>, Fifth Floor, <st1:place
+w:st="on"><st1:City w:st="on">Boston</st1:City>, <st1:State w:st="on">MA</st1:State></st1:place></p>
+
+<p class=MsoNormal># 02110-1301 <st1:place w:st="on"><st1:country-region w:st="on">USA</st1:country-region></st1:place>,
+or see the FSF site: http://www.fsf.org.</p>
+
+<p class=MsoNormal>########################################################################</p>
+
+<p class=MsoNormal><b><span style='font-size:16.0pt;font-family:Arial;
+background:white;mso-highlight:white;mso-font-kerning:16.0pt'><o:p>&nbsp;</o:p></span></b></p>
+
+<p class=MsoNormal><b><span style='font-size:16.0pt;font-family:Arial;
+background:white;mso-highlight:white;mso-font-kerning:16.0pt'><o:p>&nbsp;</o:p></span></b></p>
+
+<b><span style='font-size:16.0pt;font-family:Arial;mso-fareast-font-family:
+"Times New Roman";background:white;mso-highlight:white;mso-font-kerning:16.0pt;
+mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA'><br
+clear=all style='page-break-before:always'>
+</span></b>
+
+<p class=MsoNormal><span class=Heading1Char><span style='font-size:16.0pt;
+background:white;mso-highlight:white'>1. Introduction</span></span><span
+class=Heading1Char><span style='font-size:16.0pt'><o:p></o:p></span></span></p>
+
+<p class=MsoNormal><span style='background:white;mso-highlight:white'>As part
+of the Loan Broker Demo, the broker goes out to a few banks to obtain loan
+quotes.</span></p>
+
+<p class=MsoNormal><span style='background:white;mso-highlight:white'>This
+folder contains two banks:</span></p>
+
+<p class=MsoNormal><o:p>&nbsp;</o:p></p>
+
+<p class=MsoNormal><span style='background:white;mso-highlight:white'>1. <span
+class=GramE>a</span> Flat File Based Bank, and</span></p>
+
+<p class=MsoNormal><span style='background:white;mso-highlight:white'>2. <span
+class=GramE>a</span> JMS Based bank.</span></p>
+
+<p class=MsoNormal><o:p>&nbsp;</o:p></p>
+
+<p class=MsoNormal><span style='background:white;mso-highlight:white'>To make
+the demo a little more interesting we have the banks use two different
+protocols (flat file and JMS), and two</span> <span style='background:white;
+mso-highlight:white'>different message formats (<span class=SpellE>csv</span>,
+xml). You can customize some of the configuration in the <span class=SpellE>bank.properties</span>
+file. Not that</span> <span style='background:white;mso-highlight:white'>the
+banks use to log4j.xml in the current directory. </span></p>
+
+<h2><span style='background:white;mso-highlight:white'>2. Flat File Based Bank</span></h2>
+
+<h3><span style='background:white;mso-highlight:white'>2.1 Starting the bank</span></h3>
+
+<p class=MsoNormal><span style='background:white;mso-highlight:white'>The Flat
+File Based Bank uses the property '<span class=SpellE>file.monitored.directory</span>'
+which by default is set to 'C<span class=GramE>:\</span>Temp\<span
+class=SpellE>BankInput</span>'.</span> <span style='background:white;
+mso-highlight:white'>You can start this bank by typing:</span></p>
+
+<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><span
+style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><span
+class=GramE><span style='font-size:10.0pt;font-family:"Courier New";background:
+white;mso-highlight:white'>ant</span></span><span style='font-size:10.0pt;
+font-family:"Courier New";background:white;mso-highlight:white'> <span
+class=SpellE>runFileBank</span></span><span style='font-size:10.0pt;font-family:
+"Courier New"'><o:p></o:p></span></p>
+
+<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><span
+style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><span
+style='font-size:10.0pt;font-family:"Courier New"'>* Not of caution, there is
+no filter set in the <span class=SpellE>poller</span> code, so it will pick up
+and try to move any files it finds.<o:p></o:p></span></p>
+
+<h3><span style='background:white;mso-highlight:white'>2.2 Processing details</span></h3>
+
+<p class=MsoNormal><span style='background:white;mso-highlight:white'>The <span
+class=SpellE>FlatFilePollManager</span> monitors a directory specified in the
+configuration. When a file arrives it</span> <span style='background:white;
+mso-highlight:white'>tries to process the content assuming it contains one line
+with loan request information.</span> <span style='background:white;mso-highlight:
+white'>So for example the content of the file could read something like </span></p>
+
+<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><span
+style='font-size:10.0pt;font-family:"Courier New";background:white;mso-highlight:
+white'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><span
+style='font-size:10.0pt;font-family:"Courier New";background:white;mso-highlight:
+white'>23456890<span class=GramE>,3,4,20000,5</span></span><span
+style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>
+
+<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><span
+style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal><span style='background:white;mso-highlight:white'>The order
+of values needs to be <span class=SpellE>SocialSecurityNumber</span>, <span
+class=SpellE>CreditScore</span>, <span class=SpellE>HistoryLength</span>
+[month], <span class=SpellE>LoanAmount</span> [dollar],</span> <span
+style='background:white;mso-highlight:white'>and finally the <span
+class=SpellE>LoanTerm</span> [month]. The request will be processed and a <span
+class=SpellE>BankQouteReply</span> is generated. The</span> <span
+style='background:white;mso-highlight:white'>original file is moved to a
+'processed' directory, and the <span class=SpellE>BankQuoteReply</span> is
+serialized to an 'outgoing' directory from <span class=GramE>the it</span> can
+be picked up by the system that dropped the request.</span></p>
+
+<h3><span style='background:white;mso-highlight:white'>2.3 Testing</span></h3>
+
+<p class=MsoNormal><span style='background:white;mso-highlight:white'>You can
+test whether or not the bank is working by dropping a file in the monitored
+directory (C:\Temp\BankInput).Let's say we</span> <span style='background:white;
+mso-highlight:white'>use a file with name 'request.txt'. The file should be
+ASCII and can contain the following line:</span></p>
+
+<p class=MsoNormal><o:p>&nbsp;</o:p></p>
+
+<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><span
+style='font-size:10.0pt;font-family:"Courier New";background:white;mso-highlight:
+white'>23456890<span class=GramE>,3,4,20000,5</span></span><span
+style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>
+
+<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><span
+style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal><span style='background:white;mso-highlight:white'>The file
+should get moved to the C:\Temp\BankInput\processed directory, and in the
+C:\Temp\ <span class=SpellE>BankInput</span>\outgoing directory a reply file
+should</span> <span style='background:white;mso-highlight:white'>appear with
+the name 'reply_to_request.txt'. It should contain the line:</span></p>
+
+<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><span
+style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><span
+style='font-size:10.0pt;font-family:"Courier New";background:white;mso-highlight:
+white'>8.29<span class=GramE>,FileBasedBank</span>-1,0</span><span
+style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>
+
+<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><span
+style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal><span class=GramE><span style='background:white;mso-highlight:
+white'>which</span></span><span style='background:white;mso-highlight:white'>
+means the </span><span class=SpellE><span style='font-size:10.0pt;mso-bidi-font-size:
+12.0pt;font-family:"Courier New";mso-bidi-font-family:"Times New Roman";
+background:white;mso-highlight:white'>QuoteId</span></span><span
+style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:"Courier New";
+mso-bidi-font-family:"Times New Roman";background:white;mso-highlight:white'>=FileBasedBank-1</span><span
+style='background:white;mso-highlight:white'>, the </span><span
+style='font-size:10.0pt;mso-bidi-font-size:12.0pt;font-family:"Courier New";
+mso-bidi-font-family:"Times New Roman";background:white;mso-highlight:white'>interest=8.29</span><span
+style='background:white;mso-highlight:white'> and the </span><span
+class=SpellE><span style='font-size:10.0pt;mso-bidi-font-size:12.0pt;
+font-family:"Courier New";mso-bidi-font-family:"Times New Roman";background:
+white;mso-highlight:white'>errorCode</span></span><span style='font-size:10.0pt;
+mso-bidi-font-size:12.0pt;font-family:"Courier New";mso-bidi-font-family:"Times New Roman";
+background:white;mso-highlight:white'>=0</span><span style='background:white;
+mso-highlight:white'> (which means success). You can check the logging for</span>
+<span style='background:white;mso-highlight:white'>additional details.</span></p>
+
+<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><span
+style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>
+
+<h2><span style='background:white;mso-highlight:white'>3. JMS Based Bank</span></h2>
+
+<h3><span style='background:white;mso-highlight:white'>3.1 Starting the bank</span></h3>
+
+<p class=MsoNormal><span style='background:white;mso-highlight:white'>Before
+starting the bank you need to bring up your JMS provider. For the example this
+is the JBoss AS. We are using</span> <span style='background:white;mso-highlight:
+white'>the default queues (C and D). The JMS bank uses the properties: <span
+class=SpellE>jms.provider.url</span>, <span class=SpellE>jms.queue.in</span>
+and <span class=SpellE>jms.queue.out</span>. By</span> <span style='background:
+white;mso-highlight:white'>default these are set to '<span class=SpellE>localhost</span>',
+'queue/C' and 'queue/D'. So, by default, it assumes <st1:place w:st="on"><st1:City
+ w:st="on">JBoss</st1:City> <st1:State w:st="on">AS</st1:State></st1:place> is
+running on the <span class=SpellE>localhost</span>.</span> <span
+style='background:white;mso-highlight:white'>Next you can start the JMS Based
+bank by typing:</span></p>
+
+<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><span
+style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><span
+class=GramE><span style='font-size:10.0pt;font-family:"Courier New";background:
+white;mso-highlight:white'>ant</span></span><span style='font-size:10.0pt;
+font-family:"Courier New";background:white;mso-highlight:white'> <span
+class=SpellE>runJMSBank</span></span><span style='font-size:10.0pt;font-family:
+"Courier New"'><o:p></o:p></span></p>
+
+<h3><span style='background:white;mso-highlight:white'>3.2 Processing details</span></h3>
+
+<p class=MsoNormal><span style='background:white;mso-highlight:white'>The <span
+class=SpellE>JMSManager</span> listens to an incoming queue (by default queue/C
+on <span class=SpellE>localhost</span>). It consumes the</span> <span
+style='background:white;mso-highlight:white'>message assuming it is a <span
+class=SpellE>TextMessage</span>, and that the text is an XML structure that can
+be marshaled</span> <span style='background:white;mso-highlight:white'>into a <span
+class=SpellE>BankQuoteRequest</span>. The request will be processed and a <span
+class=SpellE>BankQuote</span> Reply will be serialized to XML</span> <span
+style='background:white;mso-highlight:white'>and send to the outgoing queue (by
+default this is queue/D on <span class=SpellE>localhost</span>). If the
+processing results</span> <span style='background:white;mso-highlight:white'>in
+an error a <span class=SpellE>BankQuoteReply</span> with <span class=SpellE>ErrorCode</span>
+other then 0 is send to the outgoing queue.</span></p>
+
+<h3><span style='background:white;mso-highlight:white'>3.3 Testing</span></h3>
+
+<p class=MsoNormal><span style='background:white;mso-highlight:white'>The unit
+test <span class=SpellE>JMSProcessorTest</span> drops a <span class=SpellE>BankQuoteRequest</span>
+Message on the queue/C of <span class=SpellE>localhost</span>. You can use</span></p>
+
+<p class=MsoNormal><span class=GramE><span style='background:white;mso-highlight:
+white'>this</span></span><span style='background:white;mso-highlight:white'>
+test to check the health of the <span class=SpellE>JMSBank</span>. The tests
+can be executed by typing</span></p>
+
+<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><span
+style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>
+
+<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><span
+class=GramE><span style='font-size:10.0pt;font-family:"Courier New";background:
+white;mso-highlight:white'>ant</span></span><span style='font-size:10.0pt;
+font-family:"Courier New";background:white;mso-highlight:white'> test</span><span
+style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>
+
+<h1><span style='background:white;mso-highlight:white'>4. Finally</span></h1>
+
+<p class=MsoNormal><span style='background:white;mso-highlight:white'>You are
+now ready to run the larger Load Broker Demo itself.</span></p>
+
+</div>
+
+</body>
+
+</html>

Added: labs/jbossesb/trunk/product/samples/trailblazer/banks/bank.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/banks/bank.properties	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/banks/bank.properties	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,4 @@
+jms.provider.url=localhost
+file.monitored.directory=C:\dev\JBossESB\trunk\product\samples\trailblazer2\banks\monitored_folders\input
+jms.queue.in=queue/C
+jms.queue.out=queue/D

Added: labs/jbossesb/trunk/product/samples/trailblazer/banks/bank.properties.template
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/banks/bank.properties.template	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/banks/bank.properties.template	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,5 @@
+jms.provider.url=@jndi.host@
+file.monitored.directory=@cwd.dir@/@trail.runtime.dir@/BankInput
+
+jms.queue.in=queue/C
+jms.queue.out=queue/D

Added: labs/jbossesb/trunk/product/samples/trailblazer/banks/build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/banks/build.xml	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/banks/build.xml	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,121 @@
+<project name="BANKS" default="compile" basedir=".">
+
+	<property file="bank.properties"/>
+	<!-- Some default build locations -->
+	<property name="org.jboss.esb.ext.lib.dir"                               value="../../../lib/ext"/>
+	<property name="org.jboss.esb.samples.loanbroker.banks.dest"             value="${basedir}/build"/>
+	<property name="org.jboss.esb.samples.loanbroker.banks.classes.dir"      value="${basedir}/build/classes/banks/"/>
+	<property name="org.jboss.esb.samples.loanbroker.banks.testclasses.dir"  value="${basedir}/build/classes/tests/"/>
+	<property name="org.jboss.esb.samples.loanbroker.banks.src.dir"          value="${basedir}/src"/>
+	<property name="org.jboss.esb.samples.loanbroker.banks.test.dir"         value="${basedir}/test"/>
+	<property name="org.jboss.esb.samples.loanbroker.banks.jar.dest"         value="${basedir}/build/dist/lib/"/>
+	<property name="org.jboss.esb.samples.loanbroker.banks.lib.ext.dir"      value="${basedir}/lib/ext"/>
+	<property name="org.jboss.esb.samples.loanbroker.banks.tests.report.dir" value="${basedir}/build/tests"/>
+		
+	<path id="org.jboss.esb.samples.loanbroker.banks.classpath">
+	    <fileset dir="${org.jboss.esb.samples.loanbroker.banks.lib.ext.dir}" includes="*.jar"/>
+		<fileset dir="${org.jboss.esb.ext.lib.dir}" includes="log4j.jar jbossall-client.jar xstream-1.1.3.jar junit-4.1.jar"/>
+	</path>
+	<path id="org.jboss.esb.samples.loanbroker.banks.testclasspath">
+	    <fileset dir="${org.jboss.esb.samples.loanbroker.banks.lib.ext.dir}" includes="*.jar"/>
+		<fileset dir="${org.jboss.esb.ext.lib.dir}" includes="log4j.jar jbossall-client.jar xstream-1.1.3.jar junit-4.1.jar"/>
+	    <pathelement location="${org.jboss.esb.samples.loanbroker.banks.classes.dir}"/>
+		<pathelement location="${org.jboss.esb.samples.loanbroker.banks.testclasses.dir}"/>
+		<pathelement location="."/>
+	</path>
+	
+	<target name="clean">
+		<delete dir="${org.jboss.esb.samples.loanbroker.banks.dest}" />
+	</target>
+	<!-- =================================================================== -->
+	<!-- Prepares the directory structure                                    -->
+    <!-- =================================================================== -->
+    <target name="org.jboss.esb.samples.loanbroker.banks.prepare">
+    	<mkdir dir="${org.jboss.esb.samples.loanbroker.banks.dest}"/>
+    	<mkdir dir="${org.jboss.esb.samples.loanbroker.banks.dest}/dist"/>
+		<mkdir dir="${org.jboss.esb.samples.loanbroker.banks.dest}/classes/banks"/>
+    	<mkdir dir="${org.jboss.esb.samples.loanbroker.banks.dest}/classes/tests"/>
+    	<mkdir dir="${org.jboss.esb.samples.loanbroker.banks.dest}/tests"/>
+		<mkdir dir="${org.jboss.esb.samples.loanbroker.banks.dest}/dist/lib"/>
+    </target>
+	
+	<!-- Compilation targets -->
+	<target name="org.jboss.esb.samples.loanbroker.banks.compile" depends="org.jboss.esb.samples.loanbroker.banks.prepare"
+		description="Compile all classes">
+
+		        <javac
+		            destdir="${org.jboss.esb.samples.loanbroker.banks.classes.dir}"
+		            classpathref="org.jboss.esb.samples.loanbroker.banks.classpath"
+		        	debug="true"
+		        	>
+		            <src path="${org.jboss.esb.samples.loanbroker.banks.src.dir}"/>
+		        </javac>
+				<javac
+		            destdir="${org.jboss.esb.samples.loanbroker.banks.testclasses.dir}"
+					debug="true"
+					classpathref="org.jboss.esb.samples.loanbroker.banks.testclasspath"
+		    		>
+		            <src path="${org.jboss.esb.samples.loanbroker.banks.test.dir}"/>
+		        </javac>
+	</target>
+
+    <!-- javadocs paths -->
+	<path id="org.jboss.esb.samples.loanbroker.banks.javadocs.path">
+		<pathelement path="esb/classes"/>
+	</path>
+
+	<!-- Jar targets -->
+	<target name="org.jboss.esb.samples.loanbroker.banks.jar" depends="org.jboss.esb.samples.loanbroker.banks.compile">
+		<echo message="Building jar file"/>
+		<delete file="${org.jboss.esb.samples.loanbroker.banks.dest}/dist/lib/bank.jar" />
+        <jar    destfile="${org.jboss.esb.samples.loanbroker.banks.dest}/dist/lib/bank.jar" 
+                basedir="${org.jboss.esb.samples.loanbroker.banks.classes.dir}" 
+                includes="**/*.class"
+                />
+	</target>
+	
+	<target name="runJMSBank" depends="org.jboss.esb.samples.loanbroker.banks.jar">
+		<echo>Running JMS Based Bank</echo>
+		<echo>Note that your app-server on host: localhost needs to be up and running!</echo>
+		<java fork="yes" classname="org.jboss.soa.esb.samples.loanbroker.banks.ManagerJMS" failonerror="true">
+			<arg value="${jms.provider.url}"/>
+			<arg value="${jms.queue.in}"/>
+		    <arg value="${jms.queue.out}"/>
+			<classpath refid="org.jboss.esb.samples.loanbroker.banks.testclasspath"/>
+		</java>
+	</target>	
+	
+	<target name="runFileBank" depends="org.jboss.esb.samples.loanbroker.banks.jar">
+		<echo>Running File Based Bank</echo>
+		<java fork="yes" classname="org.jboss.soa.esb.samples.loanbroker.banks.ManagerFlatFile" failonerror="true" args="${file.monitored.directory}">
+			<classpath refid="org.jboss.esb.samples.loanbroker.banks.testclasspath"/>
+		</java>
+	</target>	
+	
+	<!-- Short target names -->
+	<target name="compile" depends="org.jboss.esb.samples.loanbroker.banks.compile"/>
+    <target name="test" depends="org.jboss.esb.samples.loanbroker.banks.test"/>
+    <target name="jar" depends="org.jboss.esb.samples.loanbroker.banks.jar"/>
+	
+    <!-- ====================================================================== -->
+    <!--         U N I T   T E S T S                                            -->
+    <!-- ====================================================================== -->
+    <target name="org.jboss.esb.samples.loanbroker.banks.test" depends="org.jboss.esb.samples.loanbroker.banks.compile">
+        <echo message="Running tests for banks"/>
+        <junit printsummary="yes" haltonerror="yes" haltonfailure="yes" showoutput="no" fork="true">
+            <formatter type="plain" usefile="false"/>
+            <formatter type="xml"/>
+            <batchtest todir="${org.jboss.esb.samples.loanbroker.banks.tests.report.dir}">
+                <fileset dir="${org.jboss.esb.samples.loanbroker.banks.test.dir}">
+                    <include name="**/**Test.java"/>
+                </fileset>
+            </batchtest>
+            <classpath>
+            	<!-- Need the tests src folder because there may be non-compiled test resources -->
+                <pathelement location="${org.jboss.esb.samples.loanbroker.banks.test.dir}"/>
+                <path refid="org.jboss.esb.samples.loanbroker.banks.testclasspath"/>
+            </classpath>
+        </junit>
+    </target>
+
+</project>

Added: labs/jbossesb/trunk/product/samples/trailblazer/banks/lib/ext/Licenses.txt
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/banks/lib/ext/Licenses.txt	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/banks/lib/ext/Licenses.txt	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,445 @@
+The jars in this directory are covered by a range of licences, as described
+below.
+
+JBoss jars:
+
+/*
+ *
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated 
+ * by the @authors tag. All rights reserved. 
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors. 
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ */
+   
+JUnit
+   
+   Common Public License Version 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC
+LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
+CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+    a) in the case of the initial Contributor, the initial code and
+documentation distributed under this Agreement, and
+
+    b) in the case of each subsequent Contributor:
+
+    i) changes to the Program, and
+
+    ii) additions to the Program;
+
+    where such changes and/or additions to the Program originate from and are
+distributed by that particular Contributor. A Contribution 'originates' from a
+Contributor if it was added to the Program by such Contributor itself or anyone
+acting on such Contributor's behalf. Contributions do not include additions to
+the Program which: (i) are separate modules of software distributed in
+conjunction with the Program under their own license agreement, and (ii) are not
+derivative works of the Program.
+
+"Contributor" means any person or entity that distributes the Program.
+
+"Licensed Patents " mean patent claims licensable by a Contributor which are
+necessarily infringed by the use or sale of its Contribution alone or when
+combined with the Program.
+
+"Program" means the Contributions distributed in accordance with this Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement,
+including all Contributors.
+
+2. GRANT OF RIGHTS
+
+    a) Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide, royalty-free copyright license to
+reproduce, prepare derivative works of, publicly display, publicly perform,
+distribute and sublicense the Contribution of such Contributor, if any, and such
+derivative works, in source code and object code form.
+
+    b) Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed
+Patents to make, use, sell, offer to sell, import and otherwise transfer the
+Contribution of such Contributor, if any, in source code and object code form.
+This patent license shall apply to the combination of the Contribution and the
+Program if, at the time the Contribution is added by the Contributor, such
+addition of the Contribution causes such combination to be covered by the
+Licensed Patents. The patent license shall not apply to any other combinations
+which include the Contribution. No hardware per se is licensed hereunder.
+
+    c) Recipient understands that although each Contributor grants the licenses
+to its Contributions set forth herein, no assurances are provided by any
+Contributor that the Program does not infringe the patent or other intellectual
+property rights of any other entity. Each Contributor disclaims any liability to
+Recipient for claims brought by any other entity based on infringement of
+intellectual property rights or otherwise. As a condition to exercising the
+rights and licenses granted hereunder, each Recipient hereby assumes sole
+responsibility to secure any other intellectual property rights needed, if any.
+For example, if a third party patent license is required to allow Recipient to
+distribute the Program, it is Recipient's responsibility to acquire that license
+before distributing the Program.
+
+    d) Each Contributor represents that to its knowledge it has sufficient
+copyright rights in its Contribution, if any, to grant the copyright license set
+forth in this Agreement.
+
+3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under its
+own license agreement, provided that:
+
+    a) it complies with the terms and conditions of this Agreement; and
+
+    b) its license agreement:
+
+    i) effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title and
+non-infringement, and implied warranties or conditions of merchantability and
+fitness for a particular purpose;
+
+    ii) effectively excludes on behalf of all Contributors all liability for
+damages, including direct, indirect, special, incidental and consequential
+damages, such as lost profits;
+
+    iii) states that any provisions which differ from this Agreement are offered
+by that Contributor alone and not by any other party; and
+
+    iv) states that source code for the Program is available from such
+Contributor, and informs licensees how to obtain it in a reasonable manner on or
+through a medium customarily used for software exchange. 
+
+When the Program is made available in source code form:
+
+    a) it must be made available under this Agreement; and
+
+    b) a copy of this Agreement must be included with each copy of the Program. 
+
+Contributors may not remove or alter any copyright notices contained within the
+Program.
+
+Each Contributor must identify itself as the originator of its Contribution, if
+any, in a manner that reasonably allows subsequent Recipients to identify the
+originator of the Contribution.
+
+4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities with
+respect to end users, business partners and the like. While this license is
+intended to facilitate the commercial use of the Program, the Contributor who
+includes the Program in a commercial product offering should do so in a manner
+which does not create potential liability for other Contributors. Therefore, if
+a Contributor includes the Program in a commercial product offering, such
+Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
+every other Contributor ("Indemnified Contributor") against any losses, damages
+and costs (collectively "Losses") arising from claims, lawsuits and other legal
+actions brought by a third party against the Indemnified Contributor to the
+extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor to
+control, and cooperate with the Commercial Contributor in, the defense and any
+related settlement negotiations. The Indemnified Contributor may participate in
+any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial product
+offering, Product X. That Contributor is then a Commercial Contributor. If that
+Commercial Contributor then makes performance claims, or offers warranties
+related to Product X, those performance claims and warranties are such
+Commercial Contributor's responsibility alone. Under this section, the
+Commercial Contributor would have to defend claims against the other
+Contributors related to those performance claims and warranties, and if a court
+requires any other Contributor to pay any damages as a result, the Commercial
+Contributor must pay those damages.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
+IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,
+NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each
+Recipient is solely responsible for determining the appropriateness of using and
+distributing the Program and assumes all risks associated with its exercise of
+rights under this Agreement, including but not limited to the risks and costs of
+program errors, compliance with applicable laws, damage to or loss of data,
+programs or equipment, and unavailability or interruption of operations.
+
+6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
+CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
+PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
+GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under applicable
+law, it shall not affect the validity or enforceability of the remainder of the
+terms of this Agreement, and without further action by the parties hereto, such
+provision shall be reformed to the minimum extent necessary to make such
+provision valid and enforceable.
+
+If Recipient institutes patent litigation against a Contributor with respect to
+a patent applicable to software (including a cross-claim or counterclaim in a
+lawsuit), then any patent licenses granted by that Contributor to such Recipient
+under this Agreement shall terminate as of the date such litigation is filed. In
+addition, if Recipient institutes patent litigation against any entity
+(including a cross-claim or counterclaim in a lawsuit) alleging that the Program
+itself (excluding combinations of the Program with other software or hardware)
+infringes such Recipient's patent(s), then such Recipient's rights granted under
+Section 2(b) shall terminate as of the date such litigation is filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails to
+comply with any of the material terms or conditions of this Agreement and does
+not cure such failure in a reasonable period of time after becoming aware of
+such noncompliance. If all Recipient's rights under this Agreement terminate,
+Recipient agrees to cease use and distribution of the Program as soon as
+reasonably practicable. However, Recipient's obligations under this Agreement
+and any licenses granted by Recipient relating to the Program shall continue and
+survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement, but in
+order to avoid inconsistency the Agreement is copyrighted and may only be
+modified in the following manner. The Agreement Steward reserves the right to
+publish new versions (including revisions) of this Agreement from time to time.
+No one other than the Agreement Steward has the right to modify this Agreement.
+IBM is the initial Agreement Steward. IBM may assign the responsibility to serve
+as the Agreement Steward to a suitable separate entity. Each new version of the
+Agreement will be given a distinguishing version number. The Program (including
+Contributions) may always be distributed subject to the version of the Agreement
+under which it was received. In addition, after a new version of the Agreement
+is published, Contributor may elect to distribute the Program (including its
+Contributions) under the new version. Except as expressly stated in Sections
+2(a) and 2(b) above, Recipient receives no rights or licenses to the
+intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.
+
+This Agreement is governed by the laws of the State of New York and the
+intellectual property laws of the United States of America. No party to this
+Agreement will bring a legal action under this Agreement more than one year
+after the cause of action arose. Each party waives its rights to a jury trial in
+any resulting litigation.
+
+
+
+XStream, Antlr, Stingtemplate BSD License
+
+Copyright (c) 2003-2005, Joe Walnes
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice, this list of
+conditions and the following disclaimer. Redistributions in binary form must reproduce
+the above copyright notice, this list of conditions and the following disclaimer in
+the documentation and/or other materials provided with the distribution.
+
+Neither the name of XStream nor the names of its contributors may be used to endorse
+or promote products derived from this software without specific prior written
+permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
+WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGE.
+
+
+
+pollmgt.jar, org.sadun.util.jar
+
+GNU Lesser General Public License
+
+Version 2.1, February 1999
+
+    Copyright (C) 1991, 1999 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
+
+    [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.]
+
+Preamble
+
+The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users.
+
+This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below.
+
+When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things.
+
+To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it.
+
+For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights.
+
+We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library.
+
+To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others.
+
+Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license.
+
+Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs.
+
+When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library.
+
+We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances.
+
+For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License.
+
+In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system.
+
+Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library.
+
+The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run.
+TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you".
+
+A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables.
+
+The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".)
+
+"Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library.
+
+Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does.
+
+1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library.
+
+You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
+
+2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.)
+
+    These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
+
+    Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library.
+
+    In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 
+
+3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices.
+
+Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy.
+
+This option is useful when you wish to copy part of the code of the Library into a program that is not a library.
+
+4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange.
+
+If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code.
+
+5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License.
+
+However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables.
+
+When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law.
+
+If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.)
+
+Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself.
+
+6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications.
+
+You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things:
+
+    a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.)
+
+    b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with.
+
+    c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution.
+
+    d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place.
+
+    e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy.
+
+For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
+
+It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute.
+
+7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above.
+
+    b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.
+
+8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
+
+9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it.
+
+10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License.
+
+11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
+
+This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
+
+12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
+
+13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation.
+
+14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
+
+NO WARRANTY
+
+15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+END OF TERMS AND CONDITIONS
+How to Apply These Terms to Your New Libraries
+If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License).
+
+To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the library's name and an idea of what it does.> Copyright (C) <year> <name of author>
+
+    This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names:
+
+    Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+    signature of Ty Coon, 1 April 1990
+    Ty Coon, President of Vice
+
+That's all there is to it!
+

Added: labs/jbossesb/trunk/product/samples/trailblazer/banks/lib/ext/org.sadun.util.jar
===================================================================
(Binary files differ)


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/banks/lib/ext/org.sadun.util.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbossesb/trunk/product/samples/trailblazer/banks/lib/ext/pollmgt.jar
===================================================================
(Binary files differ)


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/banks/lib/ext/pollmgt.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbossesb/trunk/product/samples/trailblazer/banks/log4j.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/banks/log4j.xml	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/banks/log4j.xml	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,287 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  Log4j Configuration                                                  -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+<!-- $Id: log4j.xml,v 1.26.2.5 2005/09/15 09:31:02 dimitris Exp $ -->
+
+<!--
+   | For more configuration infromation and examples see the Jakarta Log4j
+   | owebsite: http://jakarta.apache.org/log4j
+ -->
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+   <!-- ================================= -->
+   <!-- Preserve messages in a local file -->
+   <!-- ================================= -->
+
+   <!-- A time/date based rolling appender -->
+   <appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender">
+      <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+      <param name="File" value="./banks.log"/>
+      <param name="Append" value="false"/>
+
+      <!-- Rollover at midnight each day -->
+      <param name="DatePattern" value="'.'yyyy-MM-dd"/>
+
+      <!-- Rollover at the top of each hour
+      <param name="DatePattern" value="'.'yyyy-MM-dd-HH"/>
+      -->
+
+      <layout class="org.apache.log4j.PatternLayout">
+         <!-- The default pattern: Date Priority [Category] Message\n -->
+         <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
+
+         <!-- The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n
+         <param name="ConversionPattern" value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
+          -->
+      </layout>
+   </appender>
+
+   <!-- A size based file rolling appender
+   <appender name="FILE" class="org.jboss.logging.appender.RollingFileAppender">
+     <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+     <param name="File" value="${jboss.server.home.dir}/log/server.log"/>
+     <param name="Append" value="false"/>
+     <param name="MaxFileSize" value="500KB"/>
+     <param name="MaxBackupIndex" value="1"/>
+
+     <layout class="org.apache.log4j.PatternLayout">
+       <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
+     </layout>	    
+   </appender>
+   -->
+
+   <!-- ============================== -->
+   <!-- Append messages to the console -->
+   <!-- ============================== -->
+
+   <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+      <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+      <param name="Target" value="System.out"/>
+      <param name="Threshold" value="INFO"/>
+
+      <layout class="org.apache.log4j.PatternLayout">
+         <!-- The default pattern: Date Priority [Category] Message\n -->
+         <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
+      </layout>
+   </appender>
+
+   <!-- ====================== -->
+   <!-- More Appender examples -->
+   <!-- ====================== -->
+
+   <!-- Buffer events and log them asynchronously
+   <appender name="ASYNC" class="org.apache.log4j.AsyncAppender">
+     <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+     <appender-ref ref="FILE"/>
+     <appender-ref ref="CONSOLE"/>
+     <appender-ref ref="SMTP"/>
+   </appender>
+   -->
+
+   <!-- EMail events to an administrator
+   <appender name="SMTP" class="org.apache.log4j.net.SMTPAppender">
+     <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+     <param name="Threshold" value="ERROR"/>
+     <param name="To" value="admin at myhost.domain.com"/>
+     <param name="From" value="nobody at myhost.domain.com"/>
+     <param name="Subject" value="JBoss Sever Errors"/>
+     <param name="SMTPHost" value="localhost"/>
+     <param name="BufferSize" value="10"/>
+     <layout class="org.apache.log4j.PatternLayout">
+       <param name="ConversionPattern" value="[%d{ABSOLUTE},%c{1}] %m%n"/>
+     </layout>
+   </appender>
+   -->
+
+   <!-- Syslog events
+   <appender name="SYSLOG" class="org.apache.log4j.net.SyslogAppender">
+     <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+     <param name="Facility" value="LOCAL7"/>
+     <param name="FacilityPrinting" value="true"/>
+     <param name="SyslogHost" value="localhost"/>
+     <layout class="org.apache.log4j.PatternLayout">
+       <param name="ConversionPattern" value="[%d{ABSOLUTE},%c{1}] %m%n"/>
+     </layout>
+   </appender>
+   -->
+
+   <!-- Log events to JMS (requires a topic to be created)
+   <appender name="JMS" class="org.apache.log4j.net.JMSAppender">
+     <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+     <param name="Threshold" value="ERROR"/>
+     <param name="TopicConnectionFactoryBindingName" value="java:/ConnectionFactory"/>
+     <param name="TopicBindingName" value="topic/MyErrorsTopic"/>
+   </appender>
+   -->
+
+   <!-- Log events through SNMP
+   <appender name="TRAP_LOG" class="org.apache.log4j.ext.SNMPTrapAppender">
+     <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+     <param name="ImplementationClassName" value="org.apache.log4j.ext.JoeSNMPTrapSender"/>
+     <param name="ManagementHost" value="127.0.0.1"/>
+     <param name="ManagementHostTrapListenPort" value="162"/>
+     <param name="EnterpriseOID" value="1.3.6.1.4.1.24.0"/>
+     <param name="LocalIPAddress" value="127.0.0.1"/>
+     <param name="LocalTrapSendPort" value="161"/>
+     <param name="GenericTrapType" value="6"/>
+     <param name="SpecificTrapType" value="12345678"/>
+     <param name="CommunityString" value="public"/>
+     <param name="ForwardStackTraceWithTrap" value="true"/>
+     <param name="Threshold" value="DEBUG"/>
+     <param name="ApplicationTrapOID" value="1.3.6.1.4.1.24.12.10.22.64"/>
+     <layout class="org.apache.log4j.PatternLayout">
+            <param name="ConversionPattern" value="%d,%p,[%t],[%c],%m%n"/>
+     </layout>
+   </appender>
+   -->
+
+   <!--  Emit events as JMX notifications
+   <appender name="JMX" class="org.jboss.monitor.services.JMXNotificationAppender">
+      <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+      
+      <param name="Threshold" value="WARN"/>
+      <param name="ObjectName" value="jboss.system:service=Logging,type=JMXNotificationAppender"/>
+      
+      <layout class="org.apache.log4j.PatternLayout">
+         <param name="ConversionPattern" value="%d %-5p [%c] %m"/>
+      </layout>
+   </appender>
+   -->
+   
+   <!-- ================ -->
+   <!-- Limit categories -->
+   <!-- ================ -->
+
+   <!-- Limit the org.apache category to INFO as its DEBUG is verbose -->
+   <category name="org.apache">
+      <priority value="INFO"/>
+   </category>
+
+   <!-- Limit the org.jgroups category to WARN as its INFO is verbose -->
+   <category name="org.jgroups">
+      <priority value="WARN"/>
+   </category>
+
+   <!-- Limit jboss axis to INFO as its DEBUG is even more verbose -->
+   <category name="org.jboss.axis">
+      <priority value="INFO"/>
+   </category>
+
+   <!-- Limit JBoss categories
+   <category name="org.jboss">
+      <priority value="INFO"/>
+   </category>
+   -->
+   
+   <!-- Limit the JSR77 categories -->
+   <category name="org.jboss.management">
+      <priority value="INFO"/>
+   </category>
+
+   <!-- Limit JBoss webservice category
+   <category name="org.jboss.webservice">
+      <priority value="DEBUG"/>
+   </category>
+   -->
+
+   <!-- Decrease the priority threshold for the org.jboss.varia category
+   <category name="org.jboss.varia">
+     <priority value="DEBUG"/>
+   </category>
+   -->
+
+   <!-- Show the evolution of the DataSource pool in the logs [inUse/Available/Max]
+   <category name="org.jboss.resource.connectionmanager.JBossManagedConnectionPool">
+     <priority value="TRACE" class="org.jboss.logging.XLevel"/>
+   </category>
+   -->
+
+   <!--
+      | An example of enabling the custom TRACE level priority that is used
+      | by the JBoss internals to diagnose low level details. This example
+      | turns on TRACE level msgs for the org.jboss.ejb.plugins package and its
+      | subpackages. This will produce A LOT of logging output.
+   <category name="org.jboss.system">
+     <priority value="TRACE" class="org.jboss.logging.XLevel"/>
+   </category>
+   <category name="org.jboss.ejb.plugins">
+     <priority value="TRACE" class="org.jboss.logging.XLevel"/>
+   </category>
+   -->
+  
+   <!--
+       | Logs these events to SNMP:
+           - server starts/stops
+           - cluster evolution (node death/startup)
+           - When an EJB archive is deployed (and associated verified messages)
+           - When an EAR archive is deployed
+      	 
+   <category name="org.jboss.system.server.Server">
+     <priority value="INFO" />
+     <appender-ref ref="TRAP_LOG"/>
+   </category>
+  
+   <category name="org.jboss.ha.framework.interfaces.HAPartition.lifecycle">
+     <priority value="INFO" />
+     <appender-ref ref="TRAP_LOG"/>
+   </category>
+
+   <category name="org.jboss.deployment.MainDeployer">
+     <priority value="ERROR" />
+     <appender-ref ref="TRAP_LOG"/>
+   </category>
+   
+   <category name="org.jboss.ejb.EJBDeployer">
+     <priority value="INFO" />
+     <appender-ref ref="TRAP_LOG"/>
+   </category>
+   
+   <category name="org.jboss.deployment.EARDeployer">
+     <priority value="INFO" />
+     <appender-ref ref="TRAP_LOG"/>
+   </category>
+  
+   -->
+
+   <!-- ======================= -->
+   <!-- Setup the Root category -->
+   <!-- ======================= -->
+
+   <root>
+      <appender-ref ref="CONSOLE"/>
+      <appender-ref ref="FILE"/>
+   </root>
+
+   <!-- Clustering logging -->
+   <!-- Uncomment the following to redirect the org.jgroups and
+      org.jboss.ha categories to a cluster.log file.
+
+   <appender name="CLUSTER" class="org.jboss.logging.appender.RollingFileAppender">
+     <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+     <param name="File" value="${jboss.server.home.dir}/log/cluster.log"/>
+     <param name="Append" value="false"/>
+     <param name="MaxFileSize" value="500KB"/>
+     <param name="MaxBackupIndex" value="1"/>
+
+     <layout class="org.apache.log4j.PatternLayout">
+       <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
+     </layout>
+   </appender>
+   <category name="org.jgroups">
+     <priority value="DEBUG" />
+     <appender-ref ref="CLUSTER"/>
+   </category>
+   <category name="org.jboss.ha">
+     <priority value="DEBUG" />
+     <appender-ref ref="CLUSTER"/>
+   </category>
+   -->
+
+</log4j:configuration>

Added: labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/Bank.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/Bank.java	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/Bank.java	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,117 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+
+package org.jboss.soa.esb.samples.loanbroker.banks;
+
+import java.math.BigDecimal;
+
+import org.apache.log4j.Logger;
+import org.apache.log4j.Priority;
+
+/**
+ * This Bank is pretty well focussed on doing one thing, which is giving out loans. On the 
+ * reception of a BankQuoteRequest it will compute the interest rate it will return
+ * in the BankQuoteReply.
+ * 
+ * Each bank instance can be customized using the parameters bankName, RatePremium and MaxLoanTerm.
+ * 
+ * @author kstam
+ *
+ */
+public class Bank 
+{
+	private Logger logger = Logger.getLogger(this.getClass());
+	
+	private static final BigDecimal PRIME_RATE            = BigDecimal.valueOf(8.0);
+	private static final BigDecimal DEFAULT_RATE_PREMIUM  = BigDecimal.valueOf(0.5);
+	private static final int        DEFAULT_MAX_LOAN_TERM = 30;
+	private static final String     DEFAULT_BANK_NAME     = "DefaultBank";
+	private static int _quoteCounter                      = 0;
+	
+	//Default values for bank
+	private String bankName                               = DEFAULT_BANK_NAME;
+	private BigDecimal ratePremium                        = DEFAULT_RATE_PREMIUM;
+	private int maxLoanTerm                               = DEFAULT_MAX_LOAN_TERM;
+
+	/** 
+	 * The Bank's constructor.
+	 * 
+	 * @param bankName    - the name of the bank
+	 * @param ratePremium - the premium it charges for the loan
+	 * @param maxLoanTerm - the maximum loan term
+	 */
+	public Bank(String bankName, BigDecimal ratePremium, int maxLoanTerm) {
+		super();
+		if (bankName!=null) {
+			this.bankName=bankName;
+		}
+		if (ratePremium!=null) {
+			this.ratePremium=ratePremium;
+		}
+		if (maxLoanTerm > 0) {
+			this.maxLoanTerm=maxLoanTerm;
+		}
+	}
+	/**
+	 * The bank computes the interest rate based on configuration parameters of the bank and
+	 * the information in the {@link BankQuoteRequest.
+	 * @param bankQuoteRequest - the bank quote request containing requests parameters
+	 * @return bankQuoteReply  - the bank quote replay contaning the interest rate
+	 */
+	private BankQuoteReply computeBankQuoteReply(BankQuoteRequest bankQuoteRequest)
+	{
+		BankQuoteReply bankQuoteReply = new BankQuoteReply();
+		if (bankQuoteRequest.loanTerm <= maxLoanTerm) {
+			BigDecimal interestRate=BigDecimal.valueOf((bankQuoteRequest.loanTerm/12.0)/10.0);
+			interestRate=PRIME_RATE.add(ratePremium).add(interestRate);
+			bankQuoteReply.setInterestRate(interestRate.setScale(2, BigDecimal.ROUND_HALF_UP));
+			bankQuoteReply.setErrorCode(0);
+		} else {
+			bankQuoteReply.setInterestRate(BigDecimal.valueOf(0.00).setScale(2, BigDecimal.ROUND_HALF_UP));
+			bankQuoteReply.setErrorCode(1);
+		}
+		String quoteId=bankName + "-" + _quoteCounter++;
+		bankQuoteReply.setQuoteId(quoteId);
+		bankQuoteReply.setCustomerUID(bankQuoteRequest.getCustomerUID());
+		return bankQuoteReply;
+	}
+	/**
+	 * Processes the Loan Quote request and returns the banks reply.
+	 * 
+	 * @param bankQuoteRequest - the bank quote request
+	 * @return bankQuoteReply  - the bank quote reply
+	 */
+	protected BankQuoteReply processMessage(BankQuoteRequest bankQuoteRequest)
+	{
+		logger.log(Priority.INFO, "Bank '" + bankName + "' received a request for SSN=" 
+				+ bankQuoteRequest.getSsn()
+				+ " for $" + bankQuoteRequest.loanAmount 
+				+ " over " + bankQuoteRequest.loanTerm + " months.");
+		logger.log(Priority.DEBUG, bankQuoteRequest);
+		
+		BankQuoteReply bankQuoteReply = computeBankQuoteReply(bankQuoteRequest);
+		logger.log(Priority.INFO, "Bank '" + bankName + " offers SSN=" 
+				+ bankQuoteRequest.getSsn() + " " + bankQuoteReply);
+		
+		return bankQuoteReply;
+	}
+}

Added: labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/BankQuoteReply.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/BankQuoteReply.java	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/BankQuoteReply.java	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,166 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.soa.esb.samples.loanbroker.banks;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+
+public class BankQuoteReply implements Serializable 
+{
+	private static final long serialVersionUID = 1L;
+	
+	private BigDecimal interestRate;
+	private String quoteId;
+	private int errorCode;
+	private String customerUID;
+	private String customerEmail;
+	private String customerSSN;
+	private String customerName;	
+	private String customerAddress;	
+	private String customerSalary;
+	private String loanAmount;
+	private String loanDuration;
+	
+	/**
+	 * Gets the SerialVersionUID.
+	 * @return serialVersionUID
+	 */
+	public static long getSerialVersionUID() {
+		return serialVersionUID;
+	}
+	/**
+	 * Gets the errorCode.
+	 * 	<li>0 - success
+	 *  <li>1 - loan term exceeds the maximum available loan term
+	 *  <li>2 - invalid SSN
+	 *  <li>3 - invalid credit score
+	 *  <li>4 - invalid credit history length
+	 *  <li>5 - invalid loan term
+	 *  <li>6 - invalid message
+	 *  <li>7 - invalid customerUID
+	 * @return errorCode
+	 */
+	public int getErrorCode() {
+		return errorCode;
+	}
+	/**
+	 * Sets the errorCode.
+	 *  <li>0 - success
+	 *  <li>1 - loan term exceeds the maximum available loan term
+	 *  <li>2 - invalid SSN
+	 *  <li>3 - invalid credit score
+	 *  <li>4 - invalid credit history length
+	 *  <li>5 - invalid loan term
+	 * @param errorCode
+	 */
+	public void setErrorCode(int errorCode) {
+		this.errorCode = errorCode;
+	}
+	/**
+	 * Gets the quoted interest rate.
+	 * @return interestRate
+	 */
+	public BigDecimal getInterestRate() {
+		return interestRate;
+	}
+	/**
+	 * Sets the quoted interest rate.
+	 * @param interestRate
+	 */
+	public void setInterestRate(BigDecimal interestRate) {
+		this.interestRate = interestRate;
+	}
+	/**
+	 * Gets the Quote ID.
+	 * @return quoteId
+	 */
+	public String getQuoteId() {
+		return quoteId;
+	}
+	/**
+	 * Sets the quoteId.
+	 * @param quoteId
+	 */
+	public void setQuoteId(String quoteId) {
+		this.quoteId = quoteId;
+	}
+	/**
+	 * Returns a human readable string representation of this object.
+	 * @return toString
+	 */
+	public String toString() {
+		return this.getClass().getSimpleName() + "=["
+			+ "interestRate=" + interestRate
+			+ ", quoteId=" + quoteId
+			+ ", errorCode=" + errorCode 
+			+ ", customerUID=" + customerUID + "]";
+	}
+	public String getCustomerUID() {
+		return customerUID;
+	}
+	public void setCustomerUID(String customerUID) {
+		this.customerUID = customerUID;
+	}
+	public String getCustomerAddress() {
+		return customerAddress;
+	}
+	public void setCustomerAddress(String customerAddress) {
+		this.customerAddress = customerAddress;
+	}
+	public String getCustomerEmail() {
+		return customerEmail;
+	}
+	public void setCustomerEmail(String customerEmail) {
+		this.customerEmail = customerEmail;
+	}
+	public String getCustomerName() {
+		return customerName;
+	}
+	public void setCustomerName(String customerName) {
+		this.customerName = customerName;
+	}
+	public String getCustomerSalary() {
+		return customerSalary;
+	}
+	public void setCustomerSalary(String customerSalary) {
+		this.customerSalary = customerSalary;
+	}
+	public String getCustomerSSN() {
+		return customerSSN;
+	}
+	public void setCustomerSSN(String customerSSN) {
+		this.customerSSN = customerSSN;
+	}
+	public String getLoanAmount() {
+		return loanAmount;
+	}
+	public void setLoanAmount(String loanAmount) {
+		this.loanAmount = loanAmount;
+	}
+	public String getLoanDuration() {
+		return loanDuration;
+	}
+	public void setLoanDuration(String loanDuration) {
+		this.loanDuration = loanDuration;
+	}
+}

Added: labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/BankQuoteRequest.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/BankQuoteRequest.java	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/BankQuoteRequest.java	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,133 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.soa.esb.samples.loanbroker.banks;
+
+import java.io.Serializable;
+
+
+public class BankQuoteRequest implements Serializable 
+{
+	private static final long serialVersionUID = 1L;
+	public int ssn;
+	public int creditScore;
+	public int historyLength;
+	public int loanAmount;
+	public int loanTerm;
+	public String customerUID;
+	public String customerEmail;
+	public String customerSSN;
+	public String customerName;	
+	public String customerAddress;	
+	public String customerSalary;	
+	public String loanDuration;
+	
+	/**
+	 * Gets for the credit score.
+	 * @return credit score
+	 */
+	public int getCreditScore() {
+		return creditScore;
+	}
+	/**
+	 * Sets the credit score.
+	 * @param creditScore
+	 */
+	public void setCreditScore(int creditScore) {
+		this.creditScore = creditScore;
+	}
+	/**
+	 * Gets the credit history length (in months).
+	 * @return credit history length
+	 */
+	public int getHistoryLength() {
+		return historyLength;
+	}
+	/**
+	 * Sets the credit history length (in months).
+	 * @param historyLength
+	 */
+	public void setHistoryLength(int historyLength) {
+		this.historyLength = historyLength;
+	}
+	/**
+	 * Gets the requested loan amount (in dollar).
+	 * @return the loan amount
+	 */
+	public int getLoanAmount() {
+		return loanAmount;
+	}
+	/** 
+	 * Sets the loan amount.
+	 * @param loanAmount - the loan amount (in dollar).
+	 */
+	public void setLoanAmount(int loanAmount) {
+		this.loanAmount = loanAmount;
+	}
+	/**
+	 * Gets the duration of the loan, the term, (in months).
+	 * @return loanTerm
+	 */
+	public int getLoanTerm() {
+		return loanTerm;
+	}
+	/**
+	 * Sets the term (duration) of the loan (in months)
+	 * @param loanTerm
+	 */
+	public void setLoanTerm(int loanTerm) {
+		this.loanTerm = loanTerm;
+	}
+	/** 
+	 * Sets the Social Security Number (SSN).
+	 * @return ssn
+	 */
+	public int getSsn() {
+		return ssn;
+	}
+	/**
+	 * Sets the Social Security Number (SSN).
+	 * @param ssn
+	 */
+	public void setSsn(int ssn) {
+		this.ssn = ssn;
+	}
+	/**
+	 * Returns a human readable string representation of this object.
+	 * @return toString
+	 */
+	public String toString() {
+		return this.getClass().getSimpleName() + "=["
+			+ "ssn=" + ssn
+		    + ", creditScore=" + creditScore
+			+ ", historyLength=" + historyLength
+			+ ", loanAmount=" + loanAmount
+			+ ", loanTerm=" + loanTerm
+			+ ", customerUID="+ customerUID + "]";	
+	}
+	
+	public String getCustomerUID() {
+		return customerUID;
+	}
+	public void setCustomerUID(String customerUID) {
+		this.customerUID = customerUID;
+	}
+}

Added: labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/FileUtil.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/FileUtil.java	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/FileUtil.java	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,66 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.soa.esb.samples.loanbroker.banks;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+/**
+ * Utility class for reading a file into a String and back.
+ * @author kstam
+ */
+public class FileUtil {
+    /**
+     * Read the file into a String.
+     * @param file - the file to be read
+     * @return String with the content of the file
+     * @throws IOException - when we can't read the file
+     */
+    public static String readTextFile(File file) throws IOException 
+    {
+        StringBuffer sb = new StringBuffer(1024);
+        BufferedReader reader = new BufferedReader(new FileReader(file.getPath()));
+        char[] chars = new char[1];
+        while( (reader.read(chars)) > -1){
+            sb.append(String.valueOf(chars)); 
+            chars = new char[1];
+        }
+        reader.close();
+        return sb.toString();
+    }
+    /**
+     * Write a String into a file.
+     * @param file - File to which we write the String
+     * @param str - string which will be written
+     * @throws IOException - when we can't write to the file
+     */
+    public static void writeTextFile(File file, String str) throws IOException 
+    {
+        BufferedWriter writer = new BufferedWriter(new FileWriter(file.getPath()));
+        writer.write(str);
+        writer.close();
+    }
+
+}

Added: labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/ManagerFlatFile.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/ManagerFlatFile.java	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/ManagerFlatFile.java	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,211 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.samples.loanbroker.banks;
+
+import java.io.File;
+import java.math.BigDecimal;
+
+import org.apache.log4j.Logger;
+import org.apache.log4j.Priority;
+import org.apache.log4j.xml.DOMConfigurator;
+import org.sadun.util.polling.BasePollManager;
+import org.sadun.util.polling.CycleEndEvent;
+import org.sadun.util.polling.CycleStartEvent;
+import org.sadun.util.polling.DirectoryLookupEndEvent;
+import org.sadun.util.polling.DirectoryLookupStartEvent;
+import org.sadun.util.polling.DirectoryPoller;
+import org.sadun.util.polling.FileFoundEvent;
+import org.sadun.util.polling.FileSetFoundEvent;
+
+/**
+ * The FlatFilePollManager monitors a directory specified in the configuration. When a file arrives it
+ * tries to process the content assuming it contains one line with loan request information.
+ * So for example the content of the file could read some like <br>23456890,3,4,20000,5<br>
+ * The order of values needs to be SocialSecurityNumber, CreditScore, HistoryLength [month], LoanAmount [dollar],
+ * and finally the LoanTerm [month]. The request will be processed and a BankQouteReply is generated. The
+ * original file is moved to a 'processed' directory, and the BankQuoteReply is serialized to an 'outgoing' 
+ * directory from the it can be picked up by the system that dropped the request.
+ * 
+ * @author kstam
+ *
+ */
+class ManagerFlatFile extends BasePollManager 
+{
+	private Logger logger = Logger.getLogger(this.getClass());
+	
+	private static final String BANK_NAME        = "FileBasedBank";
+	private static final BigDecimal RATE_PREMIUM = BigDecimal.valueOf(0.25);
+	private static final int MAXLOANTERM         = 120;
+	protected static final String OUTGOING_DIR   = "outgoing";
+	protected static final String PREFIX         = "reply_to_";
+	protected static final String PROCESSED_DIR  = "processed";
+	/**
+	 * Handle to the cycle start event.
+	 */
+	public void cycleStarted(CycleStartEvent evt) {
+		logger.log(Priority.DEBUG, "Poller awakened "
+				+ (evt.getPoller().getFilter() == null ? "(no filtering)" : evt
+						.getPoller().getFilter().toString()));
+	}
+	/**
+	 * Handle to the cycle end event.
+	 */
+	public void cycleEnded(CycleEndEvent evt) {
+		logger.log(Priority.DEBUG, "Poller going to sleep");
+	}
+	/**
+	 * Handle to the directory lookup start event.
+	 */
+	public void directoryLookupStarted(DirectoryLookupStartEvent evt) {
+		logger.log(Priority.DEBUG, "Scanning " + evt.getDirectory());
+	}
+	/**
+	 * Handle to the directory lookup end event.
+	 */
+	public void directoryLookupEnded(DirectoryLookupEndEvent evt) {
+		logger.log(Priority.DEBUG, "Finished scanning " + evt.getDirectory());
+	}
+	/**
+	 * Handle to the file set found event. Currenty this is the only event that
+	 * is actually used to proces the incoming loan quote requests. Each file
+	 * is send to be processed.
+	 */
+	public void fileSetFound(FileSetFoundEvent evt) {
+		File[] files = evt.getFiles();
+		
+		for (int i = 0; i < files.length; i++) {
+			File file = files[i];
+			processFile(file);
+		}
+	}
+	/**
+	 * Handle to the file found event.
+	 */
+	public void fileFound(FileFoundEvent evt) {
+		logger.log(Priority.DEBUG, evt);
+		// Add artificial delay
+	}
+	/**
+	 * Returns the name of this PollManager and a quick summary of what it does.
+	 */
+	public String toString() {
+		return "FlatFilePollManager - a pollmanager which processed incoming -flat file based- loan requests";
+	}
+	/**
+	 * Each file is processed assuming it contains one line with loan request information.
+	 * So for example the content of the file could read some like <br>23456890,3,4,20000,5<br>
+	 * The order of values needs to be SocialSecurityNumber, CreditScore, HistoryLength [month], LoanAmount [dollar],
+	 * and finally the LoanTerm [month]. The BankQuoteRequest is processed and a BankQouteReply is generated. The
+	 * original file is moved to a processed directory, and the BankQuoteReply is serialized to an 'outgoing' 
+	 * directory from the it can be picked up by the system that dropped the request.
+	 * 
+	 * @param file - incoming flat file with loan quote request info.
+	 */
+	protected void processFile(File file) 
+	{
+		BankQuoteReply bankQuoteReply=new BankQuoteReply();
+		bankQuoteReply.setQuoteId(BANK_NAME);
+		int errorCode=7;
+		String message=null;
+		logger.log(Priority.INFO, "Found " + file.getAbsolutePath() );
+		
+		try {
+			BankQuoteRequest bankQuoteRequest = new BankQuoteRequest();
+            //Read the content of the file into a String
+			message=FileUtil.readTextFile(file);
+			String[] messagePart = message.split(",");
+			
+			errorCode=1;
+			bankQuoteRequest.setSsn(Integer.valueOf(messagePart[0]));
+			errorCode=2;
+			bankQuoteRequest.setCreditScore(Integer.valueOf(messagePart[1]));
+			errorCode=3;
+			bankQuoteRequest.setHistoryLength(Integer.valueOf(messagePart[2]));
+			errorCode=4;
+			bankQuoteRequest.setLoanAmount(Integer.valueOf(messagePart[3]));
+			errorCode=5;
+			bankQuoteRequest.setLoanTerm(Integer.valueOf(messagePart[4]));
+			errorCode=6;
+			bankQuoteRequest.setCustomerUID(String.valueOf(messagePart[5]));
+			
+			Bank fileBasedBank = new Bank(BANK_NAME, RATE_PREMIUM, MAXLOANTERM);
+			bankQuoteReply = fileBasedBank.processMessage(bankQuoteRequest);	
+		} catch (Throwable e) {
+			//Package up the error, so it can be processed
+			logger.log(Priority.ERROR, e.getMessage());
+			bankQuoteReply.setErrorCode(errorCode);
+		}
+		
+		try {
+			//Create the outgoing response file
+			File outgoingDir  = new File(file.getParent() + "/" + OUTGOING_DIR);
+			if (!outgoingDir.exists()) {
+				outgoingDir.mkdir();
+			}
+			File outgoingFile = new File(outgoingDir + "/" + PREFIX + file.getName());
+			logger.log(Priority.INFO, "Creating outgoing file " + outgoingFile.getAbsolutePath());
+			outgoingFile.createNewFile();
+			String reply=bankQuoteReply.getInterestRate() + "," + bankQuoteReply.getQuoteId() + "," 
+				+ bankQuoteReply.getErrorCode() + "," + bankQuoteReply.getCustomerUID();
+			logger.log(Priority.INFO, "Writing reply " + reply);
+			FileUtil.writeTextFile(outgoingFile, reply);
+			
+			//Move the processed file away so it does not get processed again
+			File processedDir  = new File(file.getParent() + "/" + PROCESSED_DIR);
+			if (!processedDir.exists()) {
+				processedDir.mkdir();
+			}
+			logger.log(Priority.INFO, "Moving file " + file.getName() + " to processed directory");
+			File processedFile = new File(processedDir.getAbsolutePath() + "/" + file.getName());
+			file.renameTo(processedFile);
+			if (file.exists()) {
+				file.delete();
+			}
+		} catch (Exception e) {
+			logger.log(Priority.ERROR, e.getMessage(), e);
+		}
+	}
+	
+	public static void main(String[] args)
+	{
+		DOMConfigurator.configure("log4j.xml");
+		String monitoredDirectoryStr = "C:/Temp/BankInput";
+		if (args!=null && args.length > 0) {
+			monitoredDirectoryStr=args[0];
+		}
+		File monitoredDirectory = new File(monitoredDirectoryStr);
+		if (!monitoredDirectory.exists() || !monitoredDirectory.isDirectory()){
+			System.err.println("Invalid directory " + monitoredDirectory.getAbsolutePath());
+			System.out.println("Trying to create the directory.");
+			try {
+				monitoredDirectory.mkdir();
+			} catch (SecurityException e) {
+				e.printStackTrace();
+			}
+		}
+		DirectoryPoller poller = new DirectoryPoller(monitoredDirectory);
+		poller.addPollManager(new ManagerFlatFile());
+		poller.start();
+	}
+	
+
+}
\ No newline at end of file

Added: labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/ManagerJMS.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/ManagerJMS.java	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/banks/src/org/jboss/soa/esb/samples/loanbroker/banks/ManagerJMS.java	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,208 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.samples.loanbroker.banks;
+
+import java.math.BigDecimal;
+import java.util.Properties;
+
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.QueueReceiver;
+import javax.jms.QueueSender;
+import javax.jms.QueueSession;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+import org.apache.log4j.Logger;
+import org.apache.log4j.Priority;
+import org.apache.log4j.xml.DOMConfigurator;
+
+import com.thoughtworks.xstream.XStream;
+import com.thoughtworks.xstream.io.xml.DomDriver;
+
+/**
+ * The JMS Manager listens to an incoming queue (by default queue/A on localhost). It consumes the
+ * message assuming it is a TextMessage, and that the text is an XML structure that can be marshalled
+ * into a BankQuoteRequest. The request will be processed and a BankQuoteRequest Reply will be serialized to XML
+ * and send to the outgoing queue (by default this is queue/B on localhost).
+ * 
+ * @author kstam
+ */
+public class ManagerJMS implements javax.jms.MessageListener {
+	private static Logger logger = Logger.getLogger(ManagerJMS.class);
+	/** Name of the Bank */
+	private static final String BANK_NAME = "JMSBasedBank";
+	/** Rate premium the bank charges */
+	private static final BigDecimal RATE_PREMIUM = BigDecimal.valueOf(0.50);
+	/** Maximum duration of the loan the bank will accept [months] */
+	private static final int MAXLOANTERM = 120;
+	/** Default incoming queue */
+	private static String QUEUE_IN = "queue/C";
+	/** Default outgoing queue */
+	private static String QUEUE_OUT = "queue/D";
+	/** Context used to lookup the Queues */
+	private static InitialContext ctx;
+	/** Properties used when constructing the InitialContext */
+	private static Properties properties = new Properties();
+	/** Queue connection for incoming queue */
+	QueueConnection inQueueConnection;
+
+	/**
+	 * Sets up the queue listener. By default is listenes to queue/A on localhost.
+	 */
+	public void listen() {
+		try {
+			//MQ Series
+			//properties.put(Context.INITIAL_CONTEXT_FACTORY,"com.ibm.mq.jms.context.WMQInitialContextFactory");
+			//properties.put(Context.PROVIDER_URL           , "dev38:1415/SYSTEM.DEF.SVRCONN");
+			//ActiveMQ
+			//properties.put(Context.INITIAL_CONTEXT_FACTORY,"org.apache.activemq.jndi.ActiveMQInitialContextFactory");
+			//properties.put(Context.PROVIDER_URL           , "tcp://localhost:61616");
+			//JBossMQ
+		    properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
+		    properties.put(Context.PROVIDER_URL           , "localhost");
+			ctx = new InitialContext(properties);
+			
+			logger.info("Looking up connection factory");
+			QueueConnectionFactory qcf = (QueueConnectionFactory) ctx
+					.lookup("ConnectionFactory");
+			logger.info("Creating connection");
+			inQueueConnection = qcf.createQueueConnection();
+			logger.info("Creating session");
+			QueueSession qs = inQueueConnection.createQueueSession(false,
+					Session.DUPS_OK_ACKNOWLEDGE);
+			logger.info("Looking up queue=" + QUEUE_IN);
+			Queue inQueue=null;
+			try {
+				inQueue = (Queue) ctx.lookup(QUEUE_IN);
+			} catch (NamingException ne) {
+				inQueue = qs.createQueue(QUEUE_IN);
+			}
+			//Queue 
+			QueueReceiver qr = qs.createReceiver(inQueue);
+			qr.setMessageListener(this);
+			inQueueConnection.start();
+		} catch (Exception e) {
+			logger.error(e.getMessage(), e);
+		}
+	}
+	/**
+	 * Sets up the queue listener. By default is listenes to queue/A on localhost.  It consumes the
+	 * message assuming it is a TextMessage, and that the text is an XML structure that can be marshalled
+	 * into a BankQuoteRequest. The request will be processed and a BankQuoteRequest Reply will be serialized to XML
+	 * and send to the outgoing queue (by default this is queue/B on localhost). If the processing results
+	 * in an error a BankQuoteReply with ErrorCode other then 0 is send to the outgoing queue.
+	 * 
+	 * @see javax.jms.MessageListener#onMessage(javax.jms.Message)
+	 * changed this to use a CSV from the request, left the reply as is - dbrum
+	 */
+	public void onMessage(Message message) {
+		QueueConnection outQueueConnection;
+		logger.info("Got message: " + message);
+		try {
+			TextMessage textMessage = (TextMessage) message;
+//			String xml = textMessage.getText();
+			String csv = textMessage.getText();
+			XStream xstream = new XStream(new DomDriver());
+			BankQuoteRequest bankQuoteRequest = getQuoteFromCSV(csv);
+			
+            
+//            xstream.fromXML(xml, bankQuoteRequest);
+			Bank bank = new Bank(BANK_NAME, RATE_PREMIUM, MAXLOANTERM);
+			BankQuoteReply bankQuoteReply = bank
+					.processMessage(bankQuoteRequest);
+			bankQuoteReply.setCustomerEmail(bankQuoteRequest.customerEmail);
+			String bankQuoteReplyXML = xstream.toXML(bankQuoteReply);
+			logger.log(Priority.INFO, "Looking up connection factory");
+			QueueConnectionFactory qcf = (QueueConnectionFactory) ctx
+					.lookup("ConnectionFactory");
+			logger.log(Priority.INFO, "Creating connection");
+			outQueueConnection = qcf.createQueueConnection();
+			try {
+				logger.log(Priority.INFO, "Creating session");
+				QueueSession qs = outQueueConnection.createQueueSession(false,
+						Session.DUPS_OK_ACKNOWLEDGE);
+				Queue outQueue = qs.createQueue(QUEUE_OUT);
+				TextMessage responseTextMessage = qs
+						.createTextMessage(bankQuoteReplyXML);
+				QueueSender queueSender = qs.createSender(outQueue);
+				queueSender.send(responseTextMessage);
+				logger.info("message being sent back on " + QUEUE_OUT + "\n" + responseTextMessage);
+			} catch (JMSException je) {
+				logger.log(Priority.ERROR, je.getMessage(), je);
+			} finally {
+				outQueueConnection.close();
+			}
+		} catch (Exception e) {
+			logger.error(e.getMessage(), e);
+		}
+	}
+	/** 
+	 * Closing the queue connection as to not leak connection resources.
+	 */
+	public void close() throws JMSException {
+		inQueueConnection.close();
+	}
+	/**
+	 * Invokes an instance of JMS based bank listener.
+	 * @param args - provider url, queue_in, queue_out
+	 */
+	public static void main(String[] args) {
+		if (args != null && args.length > 0) {
+			if (args.length > 0) {
+				QUEUE_IN = args[0];
+				if (args.length > 1) {
+					QUEUE_OUT = args[1];
+				}
+			}
+		} else {
+			System.out.println(
+					"Usage: ManagerJMS providerURL, queueIn, queueOut");
+		}
+		System.out.println("Starting JMS Bank Listener...");
+		System.out.println("Listening  to Queue '" + QUEUE_IN + "'.");
+		System.out.println("Responding to Queue '" + QUEUE_OUT + "'.");
+		DOMConfigurator.configure("log4j.xml");
+		ManagerJMS managerJMS = new ManagerJMS();
+		managerJMS.listen();
+	}
+	
+	private BankQuoteRequest getQuoteFromCSV(String csv) {
+		BankQuoteRequest quote = new BankQuoteRequest();
+		String[] parsed = csv.split(",");
+		quote.ssn=Integer.parseInt(parsed[0]);
+		quote.creditScore=Integer.parseInt(parsed[1]);
+		quote.historyLength=Integer.parseInt(parsed[2]);
+		quote.loanAmount=Integer.parseInt(parsed[3]);
+		quote.loanTerm=Integer.parseInt(parsed[4]);
+		quote.customerUID=parsed[5];
+		quote.customerEmail=parsed[6];
+		
+		return quote;
+	}
+}
\ No newline at end of file

Added: labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker/banks/BankQuoteReplyTest.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker/banks/BankQuoteReplyTest.java	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker/banks/BankQuoteReplyTest.java	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,65 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.soa.esb.samples.loanbroker.banks;
+
+import static org.junit.Assert.assertTrue;
+
+import java.math.BigDecimal;
+
+import junit.framework.JUnit4TestAdapter;
+
+import org.apache.log4j.Logger;
+import org.junit.Test;
+
+import com.thoughtworks.xstream.XStream;
+
+public class BankQuoteReplyTest {
+
+	private Logger logger = Logger.getLogger(this.getClass());
+	
+	/**
+	 * Testing the XML layout of a BankQuoteReply
+	 */
+	@Test public void obtainExampleXML(){
+		BankQuoteReply bankQuoteReply = new BankQuoteReply();
+		bankQuoteReply.setErrorCode(0);
+		bankQuoteReply.setCustomerUID("unique");
+		bankQuoteReply.setInterestRate(BigDecimal.valueOf(11.7));
+		bankQuoteReply.setQuoteId("JBBANK_1");
+		
+		XStream xstream = new XStream();
+		String bankQuoteReplyXml=xstream.toXML(bankQuoteReply);
+		logger.info("xml=\n" + bankQuoteReplyXml);
+		String expectedXml = 
+			  "<org.jboss.soa.esb.samples.loanbroker.banks.BankQuoteReply>\n"
+			+ "  <interestRate>11.7</interestRate>\n"
+            + "  <quoteId>JBBANK_1</quoteId>\n"
+            + "  <errorCode>0</errorCode>\n"
+            + "  <customerUID>unique</customerUID>\n"
+            + "</org.jboss.soa.esb.samples.loanbroker.banks.BankQuoteReply>";
+		assertTrue(expectedXml.equals(bankQuoteReplyXml));
+	}
+	
+	public static junit.framework.Test suite() {
+        return new JUnit4TestAdapter(BankQuoteReplyTest.class);
+    }
+}

Added: labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker/banks/BankQuoteRequestTest.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker/banks/BankQuoteRequestTest.java	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker/banks/BankQuoteRequestTest.java	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,66 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.soa.esb.samples.loanbroker.banks;
+
+import static org.junit.Assert.assertTrue;
+import junit.framework.JUnit4TestAdapter;
+
+import org.apache.log4j.Logger;
+import org.junit.Test;
+
+import com.thoughtworks.xstream.XStream;
+
+public class BankQuoteRequestTest {
+
+	private Logger logger = Logger.getLogger(this.getClass());
+	
+	/**
+	 * Testing the XML layout of a BankQuoteRequest
+	 */
+	@Test public void obtainExampleXML(){
+		BankQuoteRequest bankQuoteRequest = new BankQuoteRequest();
+		bankQuoteRequest.setSsn(123456890);
+		bankQuoteRequest.setCreditScore(3);
+		bankQuoteRequest.setHistoryLength(4);
+		bankQuoteRequest.setLoanTerm(5);
+		bankQuoteRequest.setLoanAmount(20000);
+		bankQuoteRequest.setCustomerUID("unique");
+		
+		XStream xstream = new XStream();
+		String bankQuoteRequestXml=xstream.toXML(bankQuoteRequest);
+		logger.info("xml=\n" + bankQuoteRequestXml);
+		String expectedXml = 
+			  "<org.jboss.soa.esb.samples.loanbroker.banks.BankQuoteRequest>\n"
+			+ "  <ssn>123456890</ssn>\n"
+			+ "  <creditScore>3</creditScore>\n"
+			+ "  <historyLength>4</historyLength>\n"
+			+ "  <loanAmount>20000</loanAmount>\n"
+			+ "  <loanTerm>5</loanTerm>\n"
+		    + "  <customerUID>unique</customerUID>\n"
+			+ "</org.jboss.soa.esb.samples.loanbroker.banks.BankQuoteRequest>";
+		assertTrue(expectedXml.equals(bankQuoteRequestXml));
+	}
+	
+	public static junit.framework.Test suite() {
+        return new JUnit4TestAdapter(BankQuoteRequestTest.class);
+    }
+}

Added: labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker/banks/BankTest.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker/banks/BankTest.java	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker/banks/BankTest.java	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,72 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.soa.esb.samples.loanbroker.banks;
+
+import static org.junit.Assert.assertTrue;
+
+import java.math.BigDecimal;
+
+import junit.framework.JUnit4TestAdapter;
+
+import org.apache.log4j.Logger;
+import org.apache.log4j.Priority;
+import org.junit.Test;
+
+public class BankTest {
+
+	private Logger logger = Logger.getLogger(this.getClass());
+	
+	/**
+	 * Tests the computation of the interestRate for the TestBank.
+	 *
+	 */
+	@Test public void processLoanRequest(){
+		
+		//Building a BankQuoteRequest
+		BankQuoteRequest bankQuoteRequest = new BankQuoteRequest();
+		bankQuoteRequest.setSsn(123456890);
+		bankQuoteRequest.setCreditScore(3);
+		bankQuoteRequest.setHistoryLength(4);
+		bankQuoteRequest.setLoanTerm(72);
+		bankQuoteRequest.setLoanAmount(20000);
+		bankQuoteRequest.setCustomerUID("unique");
+		logger.log(Priority.INFO, bankQuoteRequest);
+		
+		//Getting a Bank Instance
+		String bankName        = "TestBank";
+		BigDecimal ratePrimium = BigDecimal.valueOf(0.25);
+		int maxLoanTerm        = 120;
+		Bank bank = new Bank(bankName, ratePrimium, maxLoanTerm);
+		
+		//Getting a quote from this bank
+		BankQuoteReply bankQuoteReply = bank.processMessage(bankQuoteRequest);
+		logger.log(Priority.INFO, bankQuoteReply);
+		
+		//Checking for validity
+		BigDecimal expectedInterestRate = BigDecimal.valueOf(8.85);
+		assertTrue(bankQuoteReply.getInterestRate().equals(expectedInterestRate));
+	}
+	
+	public static junit.framework.Test suite() {
+        return new JUnit4TestAdapter(BankTest.class);
+    }
+}

Added: labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker/banks/FlatFileProcessorTest.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker/banks/FlatFileProcessorTest.java	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker/banks/FlatFileProcessorTest.java	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,112 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.soa.esb.samples.loanbroker.banks;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+
+import junit.framework.JUnit4TestAdapter;
+
+import org.apache.log4j.Logger;
+import org.apache.log4j.Priority;
+import org.junit.Test;
+
+public class FlatFileProcessorTest {
+
+	private Logger logger = Logger.getLogger(this.getClass());
+	private static String FLAT_FILE = "FlatFileProcessorTest.txt";
+	/**
+	 * Tests the processing of flat file containing a loan quote request. First
+	 * we try to find a temporary directory. When this succeeds we drop a
+	 * loan request file in there and try to process it.
+	 *
+	 */
+	@Test public void processRequest()
+	{
+		File writableDir=null;
+		logger.log(Priority.INFO, "Check to see if I can write to /tmp");
+		File tmpDir = new File("/tmp");
+		if (tmpDir.exists() && tmpDir.canWrite()) {
+			writableDir=tmpDir;
+		} else {
+			File tempDir = new File("C:/temp");
+			if (tempDir.exists() && tempDir.canWrite()) {
+				writableDir=tempDir;
+			} else {
+				logger.log(Priority.ERROR, "Could not find either /tmp or C:\\Temp for a temporary " 
+						+ "writing space.");
+			    assertTrue(false);
+			}
+		}
+//		We found a temp space so now we can drop in a load request file.
+		try {
+			logger.log(Priority.INFO, "Creating " + FLAT_FILE + " file in " + writableDir.getAbsolutePath());
+			File loanRequestFile = new File(writableDir.getAbsolutePath() + "/"+ FLAT_FILE);
+			if (loanRequestFile.exists()) {
+				loanRequestFile.delete();
+			}
+			loanRequestFile.createNewFile();
+			String str="23456890,3,4,20000,5,unique";
+			FileUtil.writeTextFile(loanRequestFile, str);
+			
+			logger.log(Priority.INFO, "Processing FlatFileProcessorTest.txt");
+			ManagerFlatFile pollManager = new ManagerFlatFile();
+			pollManager.processFile(loanRequestFile);
+			
+			//Check to see if the file is now moved.
+			assertFalse(loanRequestFile.exists());
+			
+			File processedFile = new File(writableDir.getAbsolutePath() + "/" 
+				+ ManagerFlatFile.PROCESSED_DIR + "/" + FLAT_FILE);
+			logger.log(Priority.INFO, "Check to see if " + processedFile.getAbsolutePath()
+					+ " exists");
+			assertTrue(processedFile.exists());
+			logger.log(Priority.INFO, "OK");
+			
+			File replyToFile = new File(writableDir.getAbsolutePath() + "/" 
+				+ ManagerFlatFile.OUTGOING_DIR + "/" + ManagerFlatFile.PREFIX
+				+ FLAT_FILE);
+			logger.log(Priority.INFO, "Check to see if " + replyToFile.getAbsolutePath()
+					+ " exists");
+			assertTrue(replyToFile.exists());
+			logger.log(Priority.INFO, "OK");
+			
+			//Checking the content of the reply
+			logger.log(Priority.INFO, "Check the reply, should be ('8.29,FileBasedBank-0,0,unique'");
+			assertTrue("8.29,FileBasedBank-0,0,unique".equals(FileUtil.readTextFile(replyToFile)));
+			logger.log(Priority.INFO, "OK");
+			//Cleaning up
+			processedFile.delete();
+			replyToFile.delete();
+			
+		} catch (Throwable e) {
+			logger.log(Priority.ERROR,e.getMessage(),e);
+			assertTrue(false);
+		}
+	}
+	
+	public static junit.framework.Test suite() {
+        return new JUnit4TestAdapter(FlatFileProcessorTest.class);
+    }
+}

Added: labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker/banks/JmsProcessorTest.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker/banks/JmsProcessorTest.java	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/banks/test/src/org/jboss/soa/esb/samples/loanbroker/banks/JmsProcessorTest.java	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,92 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.soa.esb.samples.loanbroker.banks;
+
+import static org.junit.Assert.assertTrue;
+
+import java.util.Properties;
+
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.QueueSender;
+import javax.jms.QueueSession;
+import javax.jms.TextMessage;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+
+import junit.framework.JUnit4TestAdapter;
+
+import org.apache.log4j.Logger;
+import org.apache.log4j.Priority;
+import org.junit.Test;
+
+public class JmsProcessorTest {
+
+	private Logger logger = Logger.getLogger(this.getClass());
+
+	/**
+	 * This can be activate if the server is running and you want
+	 * to drop a message on the queue
+	 *
+	 */
+	@Test public void sendLoanRequestXML()
+	{
+
+		QueueSession sess;
+		Queue queue;
+		try {
+			Properties properties = new Properties();
+			
+			//ActiveMQ
+			//properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
+		    //properties.put(Context.PROVIDER_URL           , "tcp://localhost:61616");
+			//JBossMQ
+		    properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
+		    properties.put(Context.PROVIDER_URL           , "localhost");
+			InitialContext ctx = new InitialContext(properties);
+		
+			QueueConnectionFactory factory = (QueueConnectionFactory) ctx
+					.lookup("ConnectionFactory");
+			QueueConnection cnn = factory.createQueueConnection();
+			sess = cnn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+			queue = sess.createQueue("queue/C");
+			//queue = sess.createQueue("queue/C");
+			String str="23456890,3,4,20000,5,unique,kurt.stam at jboss.com";
+			TextMessage msg = sess.createTextMessage(str);
+			QueueSender sender = sess.createSender(queue);
+			sender.send(msg);
+			//if the test gets here without errors it passes.
+			assertTrue(true);
+		} catch (Exception e) {
+			//if it fails it may be because the server is not up and the Queue is not found
+			//I'm not letting the test fail, since we may want to do nightly build/test runs
+			//which may not have the server up.
+			logger.log(Priority.ERROR, e.getMessage(), e);
+			logger.log(Priority.ERROR, "Is the server up and running?");
+		}
+	}
+
+	public static junit.framework.Test suite() {
+        return new JUnit4TestAdapter(JmsProcessorTest.class);
+    }
+}

Added: labs/jbossesb/trunk/product/samples/trailblazer/build.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/build.properties	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/build.properties	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,2 @@
+org.jboss.soa.samples.trailblazer.jboss_home=/cygwin/home/kstam/apps/jboss-4.0.4.GA/jbossesb
+org.jboss.soa.samples.trailblazer.jboss_server=default

Added: labs/jbossesb/trunk/product/samples/trailblazer/build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/build.xml	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/build.xml	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,236 @@
+<!--
+  JBoss, Home of Professional Open Source
+  Copyright 2006, JBoss Inc., and others contributors as indicated 
+  by the @authors tag. All rights reserved. 
+  See the copyright.txt in the distribution for a
+  full listing of individual contributors. 
+  This copyrighted material is made available to anyone wishing to use,
+  modify, copy, or redistribute it subject to the terms and conditions
+  of the GNU Lesser General Public License, v. 2.1.
+  This program is distributed in the hope that it will be useful, but WITHOUT A 
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+  PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+  You should have received a copy of the GNU Lesser General Public License,
+  v.2.1 along with this distribution; if not, write to the Free Software
+  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+  MA  02110-1301, USA.
+  
+  (C) 2005-2006,
+  @author Daniel Brum
+-->
+
+<project name="TRAILBLAZER" default="org.jboss.esb.samples.trailblazer.esb.compile" basedir=".">	
+
+	<!-- UPDATE THIS WITH YOUR JBOSS_HOME AND SERVER -->
+	<property file="build.properties" />
+
+	<property name="org.jboss.soa.samples.trailblazer.jboss_home" 		value="/usr/local/jboss-4.0.4"/>
+	<property name="org.jboss.soa.samples.trailblazer.jboss_server"	value="default"/>
+
+	<property name="org.jboss.soa.samples.trailblazer.esb_home"	 	location="../../"/>
+
+	<!-- properties for the esb part of the trailblazer -->
+	<property name="org.jboss.esb.samples.trailblazer.esb.dest"        	value="${basedir}/esb/build"/>
+	<property name="org.jboss.esb.samples.trailblazer.esb.classes.dir" 	value="${basedir}/esb/build/classes"/>
+	<property name="org.jboss.esb.samples.trailblazer.esb.testclasses.dir"  value="${basedir}/esb/build/classes/tests/"/>
+	<property name="org.jboss.esb.samples.trailblazer.esb.src.dir"          value="${basedir}/esb/src"/>
+	<property name="org.jboss.esb.samples.trailblazer.esb.test.dir"         value="${basedir}/esb/test"/>
+	<property name="org.jboss.esb.samples.trailblazer.esb.lib.dir"      	value="${basedir}/esb/lib"/>
+	<property name="org.jboss.esb.samples.trailblazer.esb.tests.report.dir" value="${basedir}/esb/build/tests"/>
+
+	<!-- properties for the client(web) part of the trailblazer -->
+	<property name="org.jboss.esb.samples.trailblazer.client.dest"        		value="${basedir}/client/build"/>
+	<property name="org.jboss.esb.samples.trailblazer.client.classes.dir" 		value="${basedir}/client/build/classes"/>
+	<property name="org.jboss.esb.samples.trailblazer.client.testclasses.dir"  	value="${basedir}/client/build/classes/tests/"/>
+	<property name="org.jboss.esb.samples.trailblazer.client.src.dir"          	value="${basedir}/client/src"/>
+	<property name="org.jboss.esb.samples.trailblazer.client.test.dir"         	value="${basedir}/client/test"/>
+	<property name="org.jboss.esb.samples.trailblazer.client.lib.dir"		value="${basedir}/client/lib"/>
+	<property name="org.jboss.esb.samples.trailblazer.client.tests.report.dir" 	value="${basedir}/client/build/tests"/>
+
+	<property environment="env" />
+
+	<!-- Build from ESB source? -->
+	<condition property="org.jboss.soa.esb.lib.dir" value="${org.jboss.soa.samples.trailblazer.esb_home}/lib">
+		<equals arg1="${org.jboss.soa.esb.buildfrom.distribution}" arg2="yes"/>
+	</condition>			
+	<property name="org.jboss.soa.esb.lib.dir" value="${org.jboss.soa.samples.trailblazer.esb_home}/build/jbossesb/lib"/>
+	<property name="org.jboss.soa.esb.lib.ext.dir" value="${org.jboss.soa.esb.lib.dir}/ext"/>
+	
+
+	<!-- classpath -->
+	<path id="org.jboss.esb.samples.trailblazer.esb.classpath">
+		<fileset dir="${org.jboss.soa.esb.lib.dir}/ext" includes="*.jar"/>
+		<fileset dir="${org.jboss.esb.samples.trailblazer.esb.lib.dir}/ext" includes="*.jar"/>
+		<fileset dir="${org.jboss.soa.samples.trailblazer.jboss_home}/client" includes="jbossall-client.jar jbossws-client.jar mail.jar"/>
+		<fileset dir="${org.jboss.soa.esb.lib.dir}" includes="*.jar"/>
+		<fileset dir="${org.jboss.esb.samples.trailblazer.client.lib.dir}/ext" includes="*.jar"/>
+	</path>
+
+	<!-- classpath for running the listener-->
+	<path id="org.jboss.esb.samples.trailblazer.esb.classpath.run">
+		<fileset dir="${org.jboss.soa.esb.lib.ext.dir}"
+				    	includes="jaxr-api-1.0.jar,scout-0.7rc2-embedded.jar,juddi-embedded.jar"/>
+		<fileset dir="${org.jboss.esb.samples.trailblazer.esb.dest}/dist" includes="trailblazer-esb.jar"/>
+		<fileset dir="${org.jboss.soa.samples.trailblazer.esb_home}/lib/ext" includes="*.jar" excludes="jaxr-api-1.0.jar,scout-0.7rc2-embedded.jar,juddi-embedded.jar"/>
+		<fileset dir="${org.jboss.soa.esb.lib.ext.dir}" includes="*.jar" excludes="jaxr-api-1.0.jar,scout-0.7rc2-embedded.jar,juddi-embedded.jar"/>
+		<fileset dir="${org.jboss.soa.samples.trailblazer.jboss_home}/client" includes="jbossall-client.jar jbossws-client.jar mail.jar"/>
+		<fileset dir="${org.jboss.soa.esb.lib.dir}" includes="*.jar"/>
+		<fileset dir="${org.jboss.esb.samples.trailblazer.esb.lib.dir}/ext" includes="*.jar"/>
+		<!-- for finding the jbossesb-properties.xml file -->
+		<pathelement location="${basedir}"/>
+	</path>
+
+	<path id="org.jboss.esb.samples.trailblazer.esb.classpath.client">
+		<fileset dir="${org.jboss.soa.esb.lib.ext.dir}"/>
+		<fileset dir="${org.jboss.esb.samples.trailblazer.esb.lib.dir}/ext" includes="*.jar"/>
+		<fileset dir="${org.jboss.soa.samples.trailblazer.jboss_home}/client" includes="jbossall-client.jar jbossws-client.jar mail.jar"/>
+		<fileset dir="${org.jboss.soa.esb.lib.dir}" includes="*.jar"/>
+		<fileset dir="${org.jboss.esb.samples.trailblazer.client.lib.dir}/ext" includes="*.jar"/>
+		<fileset dir="${org.jboss.esb.samples.trailblazer.esb.dest}/dist" includes="trailblazer-esb.jar"/>
+	</path>
+
+
+
+	<target name="clean">
+		<delete dir="${org.jboss.esb.samples.trailblazer.esb.dest}"/>
+		<delete dir="${org.jboss.esb.samples.trailblazer.client.dest}"/>
+	</target>
+	
+	<!-- =================================================================== -->
+	<!-- Prepares the directory structure                                    -->
+	<!-- =================================================================== -->
+	<target name="org.jboss.esb.samples.trailblazer.prepare">
+		<mkdir dir="${org.jboss.esb.samples.trailblazer.esb.dest}"/>
+		<mkdir dir="${org.jboss.esb.samples.trailblazer.esb.dest}/dist"/>
+		<mkdir dir="${org.jboss.esb.samples.trailblazer.esb.dest}/classes"/>
+		<mkdir dir="${org.jboss.esb.samples.trailblazer.client.dest}"/>
+		<mkdir dir="${org.jboss.esb.samples.trailblazer.client.dest}/dist"/>
+		<mkdir dir="${org.jboss.esb.samples.trailblazer.client.dest}/classes"/>
+	</target>
+
+	<!-- Compilation targets -->
+	<!-- ___________________ -->
+	
+	<!-- ESB COMPILATION -->
+	<target name="org.jboss.esb.samples.trailblazer.esb.compile" depends="org.jboss.esb.samples.trailblazer.prepare"
+		description="Compiling Trailblazer ESB classes">
+		<javac
+		            destdir="${org.jboss.esb.samples.trailblazer.esb.classes.dir}"
+		            classpathref="org.jboss.esb.samples.trailblazer.esb.classpath"
+		        	debug="true"
+		        	>
+			<src path="${org.jboss.esb.samples.trailblazer.esb.src.dir}"/>
+		</javac>
+	</target>
+
+	<!-- CLIENT(WEB) COMPILATION -->
+	<target name="org.jboss.esb.samples.trailblazer.client.compile" depends="org.jboss.esb.samples.trailblazer.prepare"
+		description="Compiling Trailblazer client classes">
+
+		<javac
+		            destdir="${org.jboss.esb.samples.trailblazer.client.classes.dir}"
+		            classpathref="org.jboss.esb.samples.trailblazer.esb.classpath.client" debug="true">
+			<src path="${org.jboss.esb.samples.trailblazer.client.src.dir}"/>
+		</javac>
+	</target>
+	
+
+	<!-- JAR/WAR targets -->
+	<target name="org.jboss.esb.samples.trailblazer.esb.jar" depends="compile" >
+		
+		<!-- ESB JAR -->
+		<echo message="Building Trailblazer ESB jar file"/>
+		<delete file="${org.jboss.esb.samples.trailblazer.esb.dest}/dist/trailblazer-esb.jar" />
+		<jar    destfile="${org.jboss.esb.samples.trailblazer.esb.dest}/dist/trailblazer-esb.jar" 
+                basedir="${org.jboss.esb.samples.trailblazer.esb.classes.dir}" 
+                includes="**/*.class" excludes="**/web/*.class">
+        </jar>
+		
+		<!-- Web side WAR -->
+		<echo message="Building Trailblazer WAR file"/>
+		<delete file="${org.jboss.esb.samples.trailblazer.client.dest}/dist/trailblazer.war" />		
+		<war    warfile="${org.jboss.esb.samples.trailblazer.client.dest}/dist/trailblazer.war"
+		        webxml="${basedir}/client/resources/web.xml">
+			<classes dir="${org.jboss.esb.samples.trailblazer.client.classes.dir}" includes="**/web/**/*.class"/>
+			<classes dir="${org.jboss.esb.samples.trailblazer.client.classes.dir}" includes="**/loanbroker/**/*.class"/>
+			<lib dir="${org.jboss.soa.esb.lib.dir}">
+				<include name="*.jar"/>
+			</lib>
+
+			<lib dir="${org.jboss.esb.samples.trailblazer.esb.dest}/dist">
+				<include name="trailblazer-esb.jar"/>
+			</lib>
+
+			<lib dir="${org.jboss.esb.samples.trailblazer.client.lib.dir}/ext">
+				<include name="axis.jar"/>
+				<include name="commons-discovery.jar"/>
+			</lib>
+			<lib dir="${org.jboss.soa.esb.lib.ext.dir}">
+				<include name="xbean-1.0.4.jar"/>
+				<include name="commons-discovery.jar"/>
+				<include name="jbossts-common.jar"/>
+				<include name="jaxr-api-1.0.jar"/>
+				<include name="scout-0.7rc2-embedded.jar"/>
+				<include name="juddi-embedded.jar"/>				
+			</lib>
+			<fileset dir="${basedir}/client/jsp">
+				<include name="**/*.jsp"/>
+			</fileset>
+			<webinf dir="${basedir}/client/resources">
+				<include name="jboss-web.xml"/>
+			</webinf>
+			<classes dir="${basedir}">
+				<include name="juddi.properties"/>
+			</classes>
+		</war>
+	</target>
+	
+	<target name="deploy-war" depends="jar">
+		<copy file="${org.jboss.esb.samples.trailblazer.client.dest}/dist/trailblazer.war"
+		todir="${org.jboss.soa.samples.trailblazer.jboss_home}/server/${org.jboss.soa.samples.trailblazer.jboss_server}/deploy"/>
+		<copy file="${basedir}/esb-quickstart-service.xml" overwrite="true"
+				todir="${org.jboss.soa.samples.trailblazer.jboss_home}/server/${org.jboss.soa.samples.trailblazer.jboss_server}/deploy"/>
+		<copy file="${basedir}/jbossesb-properties.xml" 
+				tofile="${org.jboss.soa.samples.trailblazer.jboss_home}/server/${org.jboss.soa.samples.trailblazer.jboss_server}/conf/jbossesb-properties.xml"/>
+	</target>
+	
+	<target name="deploy-jars" depends="jar">
+		<copy file="${org.jboss.esb.samples.trailblazer.esb.dest}/dist/trailblazer-esb.jar"
+		todir="${org.jboss.soa.samples.trailblazer.jboss_home}/server/${org.jboss.soa.samples.trailblazer.jboss_server}/deploy/jbossesb.sar"/>
+		<copy file="${basedir}/jbossesb-properties.xml" 
+		tofile="${org.jboss.soa.samples.trailblazer.jboss_home}/server/${org.jboss.soa.samples.trailblazer.jboss_server}/conf/jbossesb-properties.xml"/>
+		<copy file="${basedir}/esb-quickstart-service.xml"
+		todir="${org.jboss.soa.samples.trailblazer.jboss_home}/server/${org.jboss.soa.samples.trailblazer.jboss_server}/deploy"/>
+		<copy file="${org.jboss.soa.esb.lib.ext.dir}/stringtemplate-2.3b6.jar"
+		todir="${org.jboss.soa.samples.trailblazer.jboss_home}/server/${org.jboss.soa.samples.trailblazer.jboss_server}/deploy/jbossesb.sar"/>
+		<copy file="${basedir}/esb/conf/jbossesb-listener.xml" overwrite="true"
+		todir="${org.jboss.soa.samples.trailblazer.jboss_home}/server/${org.jboss.soa.samples.trailblazer.jboss_server}/conf"/>
+		<copy file="${basedir}/esb/conf/jbossesb-gateway.xml" overwrite="true"
+		todir="${org.jboss.soa.samples.trailblazer.jboss_home}/server/${org.jboss.soa.samples.trailblazer.jboss_server}/conf"/>
+	</target>
+
+
+	<!-- Short target names -->
+	<target name="compile" depends="org.jboss.esb.samples.trailblazer.esb.compile,org.jboss.esb.samples.trailblazer.client.compile"/>
+	<target name="jar" depends="org.jboss.esb.samples.trailblazer.esb.jar"/>
+
+	<!-- run the ESB listeners -->
+	<!-- set the first argument to 0 for an indefinite run for the listener launcher -->
+	<!-- arg1 = # of seconds to let the listener threads run -->
+	<!-- arg2 = location of the esb config file which describes the listener configurations for a Message aware listener config -->
+	<!-- arg3 (if any) = location of the esb config file which describes the listener configurations for a NON-Message aware listener config (gateway)-->
+	<target name="runESB" depends="jar">
+		<echo>Running ESB Trailblazer listeners</echo>
+		<java fork="yes" classname="org.jboss.soa.esb.samples.trailblazer.util.Launcher" failonerror="true" 
+			args="600 ${basedir}/esb/conf/jbossesb-listener.xml ${basedir}/esb/conf/jbossesb-gateway.xml">
+			<classpath refid="org.jboss.esb.samples.trailblazer.esb.classpath.run"/>
+		</java>
+	</target>
+
+	<!-- javadocs paths -->
+	<path id="org.jboss.esb.samples.trailblazer.esb.javadocs.path">
+		<pathelement path="esb/classes"/>
+	</path>
+
+		
+</project>

Added: labs/jbossesb/trunk/product/samples/trailblazer/client/jsp/index.jsp
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/client/jsp/index.jsp	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/client/jsp/index.jsp	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,151 @@
+<% 
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+ 
+String[] formHeader  = {"Name", "Address", "SSN", "Email", "Salary", "Employer", "LoanAmount", "LoanDuration"};
+String[] formValue   = new String[formHeader.length];
+
+String errors = "";
+int errorCount=0;
+
+for (int i=0; i<formValue.length;i++) {
+	formValue[i]    = String.valueOf(request.getParameter(formHeader[i]));
+	//out.write(formHeader[i] + "=" + formValue[i] + "<br>");
+	if ("null".equals(formValue[i]) || formValue[i]==null || "".equals(formValue[i])) {
+	        formValue[i]="";
+			errorCount++;
+			errors += formHeader[i] + " is a required field<br>";
+	}
+}
+//It's a new form. Let's set some default values.
+if (errorCount==formHeader.length) {
+	formValue[0]="Joe Broke";
+	formValue[1]="1 Spenditall Str., BrokeTown 99999 DC";
+	formValue[2]="1234567890";
+	formValue[3]="joe at iliketospendit.com";
+	formValue[4]="50000.00";
+	formValue[5]="Wesayso & Co";
+	formValue[6]="1000.00";
+	formValue[7]="12";
+}
+
+%>
+<html>
+<head>
+<title>JBossESB Loan Broker</title>
+<link rel="shortcut icon" href="/favicon.ico"/>
+<link rel="stylesheet" href="http://www.jboss.com/themes/jbosstheme/style/custom.css" type="text/css" media="all">
+<link rel="stylesheet" href="http://www.jboss.com/themes/jbosstheme/style/global.css" type="text/css" media="all">
+<link rel="stylesheet" href="http://www.jboss.com/themes/jbosstheme/style/headings.css" type="text/css" media="all">
+<link rel="stylesheet" href="http://www.jboss.com/themes/jbosstheme/style/layout.css" type="text/css" media="all">
+<link rel="stylesheet" href="http://www.jboss.com/themes/jbosstheme/style/navigation.css" type="text/css" media="all">
+<link rel="stylesheet" href="http://www.jboss.com/themes/jbosstheme/style/pagelayout.css" type="text/css" media="all">
+<link rel="stylesheet" href="http://www.jboss.com/themes/jbosstheme/style/tables.css" type="text/css" media="all">
+
+<link rel="stylesheet" href="http://www.jboss.com/themes/jbosstheme/style/screen.css" type="text/css" media="screen">
+<link rel="stylesheet" href="http://www.jboss.com/themes/jbosstheme/style/print.css" type="text/css" media="print">
+<link rel="stylesheet" href="http://www.jboss.com/themes/jbosstheme/style/common.css" type="text/css" media="all">
+</head>
+<body>
+
+<div id="TopLogo">
+  <a href="http://www.jboss.com"><img src="http://www.jboss.com/themes/jbosstheme/img/logo.gif" alt="JBoss - The Professional Open Source Company" border="0" /></a>
+</div>
+
+<div id="TopMenu">
+  <table cellpadding="0" cellspacing="0">
+  <tr>
+    <td class="menu_JBnetwork"><a href="http://network.jboss.com/">subscription</a></td>
+    <td class="menu_JBcom"><a href="http://www.jboss.com/">jboss.com</a></td>
+
+    <td class="menu_JBorg"><a href="http://labs.jboss.com">jboss.org</a></td>
+    <td class="menu_RH"><a href="http://www.redhat.com">redhat.com</a></td>
+  </tr>
+  </table>
+</div>
+
+
+<% if (errorCount!=0) { %>
+<form id="formLoanBrokerRequest" action="index.jsp" method="post">
+
+<table width="100%" border="0" cellpadding="10" cellspacing="3">
+        <tr><td colspan="2"><br><br><br><br>
+        <tr><td colspan="2"><h1>Loan Broker Request Form</h1></td></tr>
+        <% if (errorCount < formHeader.length) { %> 
+        <tr><td colspan="2"><font color="red"><%=errors %></font></td></tr>
+        <% } %>
+        <% for (int i=0; i<formHeader.length;i++) { %>
+        <tr>
+			<td width="30%" nowrap><%=formHeader[i] %></td>
+			<td width="70%"><input id="<%=formHeader[i] %>" name="<%=formHeader[i] %>" type="text"
+	   		    class="textBox" tabindex="1" size="60" value="<%=formValue[i] %>" /></td>
+	    </tr>
+	    <% } %>
+	
+	<tr>
+	    <td><INPUT TYPE="submit" VALUE="submit loan request">  </td>
+	</tr>
+</table>
+
+</form>
+
+<% } else  {
+	
+	org.jboss.soa.esb.samples.trailblazer.web.generated.LoanBrokerWSBindingStub binding=null;
+    try {
+        binding = (org.jboss.soa.esb.samples.trailblazer.web.generated.LoanBrokerWSBindingStub)
+                      new org.jboss.soa.esb.samples.trailblazer.web.generated.LoanBrokerWSServiceLocator().getLoanBrokerWSPort();
+    }
+    catch (javax.xml.rpc.ServiceException jre) {
+        if(jre.getLinkedCause()!=null)
+            jre.getLinkedCause().printStackTrace();
+        
+    }
+    // Time out after a minute
+    binding.setTimeout(60000);
+
+    //Setting the values in the request
+    org.jboss.soa.esb.samples.trailblazer.web.generated.WebCustomer webCustomer = new org.jboss.soa.esb.samples.trailblazer.web.generated.WebCustomer();
+    webCustomer.setName(formValue[0]);
+    webCustomer.setAddress(formValue[1]);
+    webCustomer.setSsn(Integer.valueOf(formValue[2]).intValue());
+    webCustomer.setEmail(formValue[3]);
+    webCustomer.setSalary(Double.valueOf(formValue[4]).doubleValue());
+    webCustomer.setEmployerName(formValue[5]);
+    webCustomer.setLoanAmount(Double.valueOf(formValue[6]).doubleValue());
+    webCustomer.setLoanDuration(Integer.valueOf(formValue[7]).intValue());
+    
+    binding.requestLoan(webCustomer); %>
+    
+    <table width="100%" border="0" cellpadding="10" cellspacing="3">
+        <tr><td><br><br><br><br>
+        <tr><td><h1>Loan Broker</h1></td></tr>
+    	<tr><td><h2>Request was submitted</h2></td></tr>
+        <tr><td><a href="index.jsp">Fill out another request</a></td></tr>
+	
+ <% } %>
+
+
+
+
+</body>
+</html>
\ No newline at end of file

Added: labs/jbossesb/trunk/product/samples/trailblazer/client/lib/ext/Licenses.txt
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/client/lib/ext/Licenses.txt	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/client/lib/ext/Licenses.txt	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,479 @@
+The jars in this directory are covered by a range of licences, as described
+below.
+
+JBoss jars:
+
+/*
+ *
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated 
+ * by the @authors tag. All rights reserved. 
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors. 
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ */
+ 
+ 
+Apache Jakarta Commons Collections/Commons Logging/Axis/Log4j:
+
+Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+   
+   
+   JUnit
+   
+   Common Public License Version 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC
+LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
+CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+    a) in the case of the initial Contributor, the initial code and
+documentation distributed under this Agreement, and
+
+    b) in the case of each subsequent Contributor:
+
+    i) changes to the Program, and
+
+    ii) additions to the Program;
+
+    where such changes and/or additions to the Program originate from and are
+distributed by that particular Contributor. A Contribution 'originates' from a
+Contributor if it was added to the Program by such Contributor itself or anyone
+acting on such Contributor's behalf. Contributions do not include additions to
+the Program which: (i) are separate modules of software distributed in
+conjunction with the Program under their own license agreement, and (ii) are not
+derivative works of the Program.
+
+"Contributor" means any person or entity that distributes the Program.
+
+"Licensed Patents " mean patent claims licensable by a Contributor which are
+necessarily infringed by the use or sale of its Contribution alone or when
+combined with the Program.
+
+"Program" means the Contributions distributed in accordance with this Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement,
+including all Contributors.
+
+2. GRANT OF RIGHTS
+
+    a) Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide, royalty-free copyright license to
+reproduce, prepare derivative works of, publicly display, publicly perform,
+distribute and sublicense the Contribution of such Contributor, if any, and such
+derivative works, in source code and object code form.
+
+    b) Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed
+Patents to make, use, sell, offer to sell, import and otherwise transfer the
+Contribution of such Contributor, if any, in source code and object code form.
+This patent license shall apply to the combination of the Contribution and the
+Program if, at the time the Contribution is added by the Contributor, such
+addition of the Contribution causes such combination to be covered by the
+Licensed Patents. The patent license shall not apply to any other combinations
+which include the Contribution. No hardware per se is licensed hereunder.
+
+    c) Recipient understands that although each Contributor grants the licenses
+to its Contributions set forth herein, no assurances are provided by any
+Contributor that the Program does not infringe the patent or other intellectual
+property rights of any other entity. Each Contributor disclaims any liability to
+Recipient for claims brought by any other entity based on infringement of
+intellectual property rights or otherwise. As a condition to exercising the
+rights and licenses granted hereunder, each Recipient hereby assumes sole
+responsibility to secure any other intellectual property rights needed, if any.
+For example, if a third party patent license is required to allow Recipient to
+distribute the Program, it is Recipient's responsibility to acquire that license
+before distributing the Program.
+
+    d) Each Contributor represents that to its knowledge it has sufficient
+copyright rights in its Contribution, if any, to grant the copyright license set
+forth in this Agreement.
+
+3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under its
+own license agreement, provided that:
+
+    a) it complies with the terms and conditions of this Agreement; and
+
+    b) its license agreement:
+
+    i) effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title and
+non-infringement, and implied warranties or conditions of merchantability and
+fitness for a particular purpose;
+
+    ii) effectively excludes on behalf of all Contributors all liability for
+damages, including direct, indirect, special, incidental and consequential
+damages, such as lost profits;
+
+    iii) states that any provisions which differ from this Agreement are offered
+by that Contributor alone and not by any other party; and
+
+    iv) states that source code for the Program is available from such
+Contributor, and informs licensees how to obtain it in a reasonable manner on or
+through a medium customarily used for software exchange. 
+
+When the Program is made available in source code form:
+
+    a) it must be made available under this Agreement; and
+
+    b) a copy of this Agreement must be included with each copy of the Program. 
+
+Contributors may not remove or alter any copyright notices contained within the
+Program.
+
+Each Contributor must identify itself as the originator of its Contribution, if
+any, in a manner that reasonably allows subsequent Recipients to identify the
+originator of the Contribution.
+
+4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities with
+respect to end users, business partners and the like. While this license is
+intended to facilitate the commercial use of the Program, the Contributor who
+includes the Program in a commercial product offering should do so in a manner
+which does not create potential liability for other Contributors. Therefore, if
+a Contributor includes the Program in a commercial product offering, such
+Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
+every other Contributor ("Indemnified Contributor") against any losses, damages
+and costs (collectively "Losses") arising from claims, lawsuits and other legal
+actions brought by a third party against the Indemnified Contributor to the
+extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor to
+control, and cooperate with the Commercial Contributor in, the defense and any
+related settlement negotiations. The Indemnified Contributor may participate in
+any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial product
+offering, Product X. That Contributor is then a Commercial Contributor. If that
+Commercial Contributor then makes performance claims, or offers warranties
+related to Product X, those performance claims and warranties are such
+Commercial Contributor's responsibility alone. Under this section, the
+Commercial Contributor would have to defend claims against the other
+Contributors related to those performance claims and warranties, and if a court
+requires any other Contributor to pay any damages as a result, the Commercial
+Contributor must pay those damages.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
+IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,
+NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each
+Recipient is solely responsible for determining the appropriateness of using and
+distributing the Program and assumes all risks associated with its exercise of
+rights under this Agreement, including but not limited to the risks and costs of
+program errors, compliance with applicable laws, damage to or loss of data,
+programs or equipment, and unavailability or interruption of operations.
+
+6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
+CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
+PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
+GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under applicable
+law, it shall not affect the validity or enforceability of the remainder of the
+terms of this Agreement, and without further action by the parties hereto, such
+provision shall be reformed to the minimum extent necessary to make such
+provision valid and enforceable.
+
+If Recipient institutes patent litigation against a Contributor with respect to
+a patent applicable to software (including a cross-claim or counterclaim in a
+lawsuit), then any patent licenses granted by that Contributor to such Recipient
+under this Agreement shall terminate as of the date such litigation is filed. In
+addition, if Recipient institutes patent litigation against any entity
+(including a cross-claim or counterclaim in a lawsuit) alleging that the Program
+itself (excluding combinations of the Program with other software or hardware)
+infringes such Recipient's patent(s), then such Recipient's rights granted under
+Section 2(b) shall terminate as of the date such litigation is filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails to
+comply with any of the material terms or conditions of this Agreement and does
+not cure such failure in a reasonable period of time after becoming aware of
+such noncompliance. If all Recipient's rights under this Agreement terminate,
+Recipient agrees to cease use and distribution of the Program as soon as
+reasonably practicable. However, Recipient's obligations under this Agreement
+and any licenses granted by Recipient relating to the Program shall continue and
+survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement, but in
+order to avoid inconsistency the Agreement is copyrighted and may only be
+modified in the following manner. The Agreement Steward reserves the right to
+publish new versions (including revisions) of this Agreement from time to time.
+No one other than the Agreement Steward has the right to modify this Agreement.
+IBM is the initial Agreement Steward. IBM may assign the responsibility to serve
+as the Agreement Steward to a suitable separate entity. Each new version of the
+Agreement will be given a distinguishing version number. The Program (including
+Contributions) may always be distributed subject to the version of the Agreement
+under which it was received. In addition, after a new version of the Agreement
+is published, Contributor may elect to distribute the Program (including its
+Contributions) under the new version. Except as expressly stated in Sections
+2(a) and 2(b) above, Recipient receives no rights or licenses to the
+intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.
+
+This Agreement is governed by the laws of the State of New York and the
+intellectual property laws of the United States of America. No party to this
+Agreement will bring a legal action under this Agreement more than one year
+after the cause of action arose. Each party waives its rights to a jury trial in
+any resulting litigation.
+
+
+
+XStream, Antlr, Stingtemplate BSD License
+
+Copyright (c) 2003-2005, Joe Walnes
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice, this list of
+conditions and the following disclaimer. Redistributions in binary form must reproduce
+the above copyright notice, this list of conditions and the following disclaimer in
+the documentation and/or other materials provided with the distribution.
+
+Neither the name of XStream nor the names of its contributors may be used to endorse
+or promote products derived from this software without specific prior written
+permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
+WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGE.
+
+

Added: labs/jbossesb/trunk/product/samples/trailblazer/client/lib/ext/axis.jar
===================================================================
(Binary files differ)


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/client/lib/ext/axis.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbossesb/trunk/product/samples/trailblazer/client/lib/ext/commons-discovery.jar
===================================================================
(Binary files differ)


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/client/lib/ext/commons-discovery.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbossesb/trunk/product/samples/trailblazer/client/lib/ext/milyn-smooks-csv-0.1.jar
===================================================================
(Binary files differ)


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/client/lib/ext/milyn-smooks-csv-0.1.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbossesb/trunk/product/samples/trailblazer/client/lib/ext/opencsv-1.6.jar
===================================================================
(Binary files differ)


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/client/lib/ext/opencsv-1.6.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbossesb/trunk/product/samples/trailblazer/client/resources/LoanBrokerWS-wsdl
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/client/resources/LoanBrokerWS-wsdl	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/client/resources/LoanBrokerWS-wsdl	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<definitions name="LoanBrokerWSService" targetNamespace="http://localhost/trailblazerWS">
+<types>
+	<schema elementFormDefault="qualified" targetNamespace="http://localhost/trailblazerWS">
+	<complexType name="WebCustomer">
+		<sequence>
+			<element name="address" nillable="true" type="string"/>
+			<element name="email" nillable="true" type="string"/>
+			<element name="employerName" nillable="true" type="string"/>
+			<element name="loanAmount" type="double"/>
+			<element name="loanDuration" type="int"/>
+			<element name="name" nillable="true" type="string"/>
+			<element name="salary" type="double"/>
+			<element name="ssn" type="int"/>
+		</sequence>
+	</complexType>
+	</schema>
+</types>
+
+<message name="LoanBrokerESB-WS_RequestLoanResponse"/>
+	<message name="LoanBrokerESB-WS_RequestLoan">
+<part name="WebCustomer_1" type="tns:WebCustomer"/>
+</message>
+<portType name="LoanBrokerESB-WS">
+	<operation name="RequestLoan" parameterOrder="WebCustomer_1">
+<input message="tns:LoanBrokerESB-WS_RequestLoan"/>
+<output message="tns:LoanBrokerESB-WS_RequestLoanResponse"/>
+</operation>
+</portType>
+	<binding name="LoanBrokerESB-WSBinding" type="tns:LoanBrokerESB-WS">
+<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+	<operation name="RequestLoan">
+<soap:operation soapAction=""/>
+	<input>
+<soap:body namespace="http://localhost/trailblazerWS" use="literal"/>
+</input>
+	<output>
+<soap:body namespace="http://localhost/trailblazerWS" use="literal"/>
+</output>
+</operation>
+</binding>
+	<service name="LoanBrokerWSService">
+	<port binding="tns:LoanBrokerESB-WSBinding" name="LoanBrokerESB-WSPort">
+<soap:address location="http://d820:8080/trailblazer/LoanBrokerWS"/>
+</port>
+</service>
+</definitions>

Added: labs/jbossesb/trunk/product/samples/trailblazer/client/resources/LoanBrokerWS-wsdl.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/client/resources/LoanBrokerWS-wsdl.xml	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/client/resources/LoanBrokerWS-wsdl.xml	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<definitions name="LoanBrokerWSService" targetNamespace="http://localhost/trailblazerWS">
+<types>
+	<schema elementFormDefault="qualified" targetNamespace="http://localhost/trailblazerWS">
+	<complexType name="WebCustomer">
+		<sequence>
+			<element name="address" nillable="true" type="string"/>
+			<element name="email" nillable="true" type="string"/>
+			<element name="employerName" nillable="true" type="string"/>
+			<element name="loanAmount" type="double"/>
+			<element name="loanDuration" type="int"/>
+			<element name="name" nillable="true" type="string"/>
+			<element name="salary" type="double"/>
+			<element name="ssn" type="int"/>
+		</sequence>
+	</complexType>
+	</schema>
+</types>
+
+<message name="LoanBrokerESB-WS_RequestLoanResponse"/>
+	<message name="LoanBrokerESB-WS_RequestLoan">
+<part name="WebCustomer_1" type="tns:WebCustomer"/>
+</message>
+<portType name="LoanBrokerESB-WS">
+	<operation name="RequestLoan" parameterOrder="WebCustomer_1">
+<input message="tns:LoanBrokerESB-WS_RequestLoan"/>
+<output message="tns:LoanBrokerESB-WS_RequestLoanResponse"/>
+</operation>
+</portType>
+	<binding name="LoanBrokerESB-WSBinding" type="tns:LoanBrokerESB-WS">
+<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+	<operation name="RequestLoan">
+<soap:operation soapAction=""/>
+	<input>
+<soap:body namespace="http://localhost/trailblazerWS" use="literal"/>
+</input>
+	<output>
+<soap:body namespace="http://localhost/trailblazerWS" use="literal"/>
+</output>
+</operation>
+</binding>
+	<service name="LoanBrokerWSService">
+	<port binding="tns:LoanBrokerESB-WSBinding" name="LoanBrokerESB-WSPort">
+<soap:address location="http://d820:8080/trailblazer/LoanBrokerWS"/>
+</port>
+</service>
+</definitions>

Added: labs/jbossesb/trunk/product/samples/trailblazer/client/resources/LoanBrokerWS.wsdl
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/client/resources/LoanBrokerWS.wsdl	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/client/resources/LoanBrokerWS.wsdl	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<definitions name="LoanBrokerWSService" targetNamespace="http://localhost/trailblazer">
+	<types>
+	<schema elementFormDefault="qualified" targetNamespace="http://localhost/trailblazer">
+	<complexType name="WebCustomer">
+	<sequence>
+<element name="address" nillable="true" type="string"/>
+<element name="email" nillable="true" type="string"/>
+<element name="employerName" nillable="true" type="string"/>
+<element name="loanAmount" type="double"/>
+<element name="loanDuration" type="int"/>
+<element name="name" nillable="true" type="string"/>
+<element name="salary" type="double"/>
+<element name="ssn" type="int"/>
+</sequence>
+</complexType>
+</schema>
+</types>
+<message name="LoanBrokerWS_RequestLoanResponse"/>
+	<message name="LoanBrokerWS_RequestLoan">
+<part name="WebCustomer_1" type="tns:WebCustomer"/>
+</message>
+	<portType name="LoanBrokerWS">
+	<operation name="RequestLoan" parameterOrder="WebCustomer_1">
+<input message="tns:LoanBrokerWS_RequestLoan"/>
+<output message="tns:LoanBrokerWS_RequestLoanResponse"/>
+</operation>
+</portType>
+	<binding name="LoanBrokerWSBinding" type="tns:LoanBrokerWS">
+<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+	<operation name="RequestLoan">
+<soap:operation soapAction=""/>
+	<input>
+<soap:body namespace="http://localhost/trailblazer" use="literal"/>
+</input>
+	<output>
+<soap:body namespace="http://localhost/trailblazer" use="literal"/>
+</output>
+</operation>
+</binding>
+	<service name="LoanBrokerWSService">
+	<port binding="tns:LoanBrokerWSBinding" name="LoanBrokerWSPort">
+<soap:address location="http://localhost:8080/trailblazer/LoanBrokerWS"/>
+</port>
+</service>
+</definitions>

Added: labs/jbossesb/trunk/product/samples/trailblazer/client/resources/from__loanbroker.cdrl
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/client/resources/from__loanbroker.cdrl	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/client/resources/from__loanbroker.cdrl	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,16 @@
+<?xml version='1.0'?>
+<!DOCTYPE smooks-resource-list PUBLIC '-//MILYN//DTD SMOOKS 1.0//EN' 'http://milyn.org/dtd/smooksres-list-1.0.dtd'>
+
+<smooks-resource-list>
+
+	<!-- 
+		Bank Quotes from the loan broker are always in CSV format.  Need to enable a CSV to SAX parser
+		to enable transformation of these messages.
+		
+		See: http://milyn.codehaus.org/javadoc/smooks-cartridges/csv/org/milyn/csv/CSVParser.html
+	-->
+	<smooks-resource useragent="type:BankQuote-CSV AND from:LoanBroker" selector="org.xml.sax.driver" path="org.milyn.csv.CSVParser" >
+		<param name="fields" type="string-list">ssn,creditScore,creditHistoryLen,amount,term,customerUniqueId</param>
+	</smooks-resource>
+
+</smooks-resource-list>

Added: labs/jbossesb/trunk/product/samples/trailblazer/client/resources/jboss-web.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/client/resources/jboss-web.xml	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/client/resources/jboss-web.xml	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?> 
+<jboss-web>
+	<class-loading java2ClassLoadingCompliance="false">
+	<loader-repository>	
+		org.jboss.soa.esb:loader=jbossesb
+		<loader-repository-config>java2ParentDelegation=false</loader-repository-config>
+	</loader-repository>
+	</class-loading>
+</jboss-web>
+
+
+

Added: labs/jbossesb/trunk/product/samples/trailblazer/client/resources/smooks-cdr.lst
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/client/resources/smooks-cdr.lst	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/client/resources/smooks-cdr.lst	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,31 @@
+#################################################################################################################################################
+#
+# OVERVIEW:
+# =========
+# This is the Smooks configuration file "list file" i.e. it lists all the Smooks resource configuration files.  One should think of these
+# configuration files as being the Smooks configuration database.  These configurations may/will eventually be maintained in a database
+# with a graphical UI to aid comprehension.
+#
+# THINGS TO NOTE:
+# ===============
+# 1. Don't try to apply any significance to the fact that there are multiple .cdrl files.  This does not mean they are
+#    separate transformations.  All these files are loaded by Smooks to make up a "database" of transformation
+#    resource configurations.  Smooks will dynamically select the resource configurations that apply in a given situation
+#    based on the profiles associated with the requested transformation "useragent" e.g. message type, message producer,
+#    message consumer.
+#
+# 2. The .cdrl list entries in this file are resource references on the *classpath* i.e. they're not filesystem paths.
+#    These .cdrl files should all be located in the "transform" folder.
+#
+#################################################################################################################################################
+
+################################################################################
+# Message transformation resource definitions
+################################################################################
+/from__loanbroker.cdrl
+/to____jmsbank.cdrl
+
+################################################################################
+# Common transformation support resource definitions.
+################################################################################
+/org/milyn/templating/templating-cdu-creators-0.1.cdrl

Added: labs/jbossesb/trunk/product/samples/trailblazer/client/resources/to____jmsbank.cdrl
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/client/resources/to____jmsbank.cdrl	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/client/resources/to____jmsbank.cdrl	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,40 @@
+<?xml version='1.0'?>
+<!DOCTYPE smooks-resource-list PUBLIC '-//MILYN//DTD SMOOKS 1.0//EN' 'http://milyn.org/dtd/smooksres-list-1.0.dtd'>
+
+<smooks-resource-list>
+
+	<!-- 
+		1.	Bank Quotes from the loan broker are always XML'ified CSV records.
+			See from__loanbroker.cdrl
+		2.	The JMSBank needs this data as XML, but the XML produced by CSVParser needs the following
+			modifications:
+			i)	A general restructuring of the <csv-record> elements to fit the format requirements of the JMSBank.
+				(See http://milyn.codehaus.org/javadoc/smooks-cartridges/templating/org/milyn/templating/xslt/XslContentDeliveryUnitCreator.html)
+			ii)	Remove the root <csv-set>.  We know that there's only one CSV record in this set and the JMSBank
+				expects the root to be "org.jboss.soa.esb.samples.loanbroker.banks.BankQuoteRequest".
+				(See http://milyn.codehaus.org/javadoc/smooks-cartridges/misc/org/milyn/cdres/trans/RemoveElementTU.html)
+				Note of course that this particular transformation could be easily avoided by simply targeting the XSLT
+				transformation at the <csv-set> element.  However, if multiple <csv-record> elements were present and
+				supported by the JMS Bank, a configuration like this would be more appropriate - the only difference being
+				that the <csv-set> would more like get renamed than removed.
+	-->
+	<smooks-resource useragent="type:BankQuote-CSV AND from:LoanBroker AND to:JMSBank" selector="csv-record">
+		<param name="restype">xsl</param>
+		<param name="resdata">
+			<![CDATA[
+				<org.jboss.soa.esb.samples.loanbroker.banks.BankQuoteRequest>
+					<ssn><xsl:value-of select="ssn"/></ssn>
+					<creditScore><xsl:value-of select="creditScore"/></creditScore>
+					<historyLength><xsl:value-of select="creditHistoryLen"/></historyLength>
+					<loanAmount><xsl:value-of select="amount"/></loanAmount>
+					<loanTerm><xsl:value-of select="term"/></loanTerm>
+					<customerUID><xsl:value-of select="customerUniqueId"/></customerUID>
+				</org.jboss.soa.esb.samples.loanbroker.banks.BankQuoteRequest>
+			]]>
+		</param>
+	</smooks-resource>
+	<smooks-resource useragent="type:BankQuote-CSV AND from:LoanBroker AND to:JMSBank" selector="csv-set" path="org.milyn.cdres.trans.RemoveElementTU">
+		<param name="keepChildContent">true</param>
+	</smooks-resource>
+
+</smooks-resource-list>

Added: labs/jbossesb/trunk/product/samples/trailblazer/client/resources/web.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/client/resources/web.xml	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/client/resources/web.xml	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?> 
+
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation= "http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4"> 
+	<servlet> 
+		<servlet-name>LoanBrokerWS</servlet-name> 
+		<servlet-class>org.jboss.soa.esb.samples.trailblazer.web.LoanBrokerWS</servlet-class>
+	</servlet>
+	<servlet-mapping>
+		<servlet-name>LoanBrokerWS</servlet-name>
+		<url-pattern>/LoanBrokerWS</url-pattern>
+	</servlet-mapping>
+</web-app>

Added: labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/Customer.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/Customer.java	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/Customer.java	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,42 @@
+package org.jboss.soa.esb.samples.trailblazer.loanbroker;
+
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated 
+ * by the @authors tag. All rights reserved. 
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors. 
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author mark.little at jboss.com
+ */
+
+import java.io.Serializable;
+
+public class Customer implements Serializable {
+	public	String	name=""	,address=""	,employerName="";
+	public	double	salary=0.0	,loanAmount=0.0;
+	public	int		loanDuration=0;	
+	public int		ssn=0;
+	public String	email="";
+	public int creditScore=0;
+	public String quoteID, rateOffered, quoteCode;
+	
+	public String getCSV() {
+		String buff = (name+","+ssn+","+address+","+employerName+","+salary+","
+				+loanAmount+","+loanDuration+","+email+","+creditScore);
+				
+		return buff;
+	}
+
+}

Added: labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/CustomerMasterFile.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/CustomerMasterFile.java	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/CustomerMasterFile.java	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,86 @@
+package org.jboss.soa.esb.samples.trailblazer.loanbroker;
+
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated 
+ * by the @authors tag. All rights reserved. 
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors. 
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author mark.little at jboss.com
+ */
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+
+/*
+ * Utility class used to persist the customer quote requests to a serialized Hash list on the file system
+ * Key is the customer's SSN #
+ */
+
+public class CustomerMasterFile implements Serializable {
+	private static Map<String, Customer> customers;
+	private static final String TMP_DIR	= System.getProperty("java.io.tmpdir","/tmp");
+	private static final File FILE = new File(TMP_DIR, "customers");
+	
+	static {
+		getCustomers();
+	}
+	
+	public static synchronized void writeCustomers() {
+		try {
+			ObjectOutputStream stream = new ObjectOutputStream(new FileOutputStream(FILE));
+			stream.writeObject(customers);
+		} catch (FileNotFoundException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		} catch (IOException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		
+		
+	}
+	
+	@SuppressWarnings("unchecked")
+	public static synchronized void  getCustomers() {
+		
+		try {
+			ObjectInputStream ois = new ObjectInputStream(new FileInputStream(FILE));
+			customers = (Map<String, Customer>)ois.readObject();
+		} catch (Exception e) {
+			customers = new HashMap<String, Customer>();
+		}	
+		
+	}
+	
+	public static Customer getCustomer(String id) {
+		return customers.get(id);
+	}
+	
+	public static void addCustomer(String id, Customer customer) {
+		customers.put(id, customer);
+		writeCustomers();
+	}
+	
+
+}

Added: labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/LoanBroker.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/LoanBroker.java	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/LoanBroker.java	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,209 @@
+package org.jboss.soa.esb.samples.trailblazer.loanbroker;
+
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated 
+ * by the @authors tag. All rights reserved. 
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors. 
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author mark.little at jboss.com
+ */
+
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.actions.ActionProcessingException;
+import org.jboss.soa.esb.addressing.EPR;
+import org.jboss.soa.esb.addressing.eprs.JMSEpr;
+import org.jboss.soa.esb.common.ModulePropertyManager;
+import org.jboss.soa.esb.couriers.Courier;
+import org.jboss.soa.esb.couriers.CourierFactory;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessageFactory;
+import org.jboss.soa.esb.message.format.MessageType;
+import org.jboss.soa.esb.samples.trailblazer.web.WebCustomer;
+import org.jboss.soa.esb.services.registry.Registry;
+import org.jboss.soa.esb.services.registry.RegistryFactory;
+
+/*
+ * LoanBroker is responsible for getting customer requests for loans onto the JBoss ESB
+ * Requests will come from a JSR-181 pojo web service (@org.jboss.soa.esb.samples.trailblazer.web.LoanBrokerWS)
+ * The sequence of events from the LoanBroker are:
+ * 1 - Prepare a request for the CreditAgency (transform the customer into a XML representation)
+ * 2 - Send to CreditAgency and get response (lookup the customer using the SSN (see @CustomerMasterFile)
+ * 3 - Prepare a LoanRequest for each of the banks in their unique data structures and send
+ * 4 - Collect the response(s) from the bank(s) and send an email to the customer with the quote offers
+ */
+
+public class LoanBroker {
+	
+	private static Logger logger = Logger.getLogger(LoanBroker.class);
+	//used to locate our entries in the trailblazer-properties
+	private final String MODULE_NAME = "trailblazer";
+	private final String SERVICE_NAME = "org.jboss.soa.esb.trailblazer.request.service.epr.name";
+	private final String SERVICE_CAT  = "org.jboss.soa.esb.trailblazer.request.service.category";
+	private final String JMS_BANK_QUEUE="org.jboss.soa.esb.trailblazer.jmsbank.queue";
+	
+	
+	public LoanBroker() {
+//		System.setProperty("org.jboss.soa.esb.propertyFile", "jbossesb-properties.xml");
+//		System.setProperty("juddi.propertiesFile", "juddi.properties");
+		
+	}
+	
+	public void processLoanRequest(WebCustomer wCustomer){
+		
+		Customer customer = getCustomer(wCustomer);
+		//keep the customer in a file someplace for later use, if needed
+		CustomerMasterFile.addCustomer(String.valueOf(customer.ssn), customer);
+		
+		//step 1 - send to credit agency for credit score if available
+		//uses 2way courier for a response TODO: figure out why this does not work!
+		sendToCreditAgency(customer);
+		
+		try {
+			Thread.sleep(5000);
+		} catch (InterruptedException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		
+		//step 2 - send to JMS Bank - async
+		sendToJMSBank(customer);
+		
+		//step 3 - send to File Bank (when listener is ready)
+		
+		//step 4 - send to SQL Bank (when listener ready)
+		
+	}
+	
+	private Customer getCustomer(WebCustomer wCustomer) {
+		Customer customer = new Customer();
+		customer.ssn = wCustomer.ssn;
+		customer.name = wCustomer.name;
+		customer.address = wCustomer.address;
+		customer.email = wCustomer.email;
+		customer.salary = wCustomer.salary;
+		customer.loanAmount = wCustomer.loanAmount;
+		customer.loanDuration = wCustomer.loanDuration;
+		customer.creditScore = 0;
+		
+		return customer;
+	}
+	
+	
+	//uses plain JMS to send a text message
+	private void sendToJMSBank(Customer customer) {
+		try {
+			//create a Quote Request that the bank expects
+			QuoteRequest quote = new QuoteRequest();
+			quote.ssn=customer.ssn;
+			quote.amount=(int)customer.loanAmount;
+			quote.creditScore=customer.creditScore;
+			quote.creditHistoryLen=0;	//not sure who added this one
+			quote.term=customer.loanDuration;
+			quote.customerEmail=customer.email;
+			
+			SendJMSMessage sender = new SendJMSMessage();
+			sender.setupConnection(
+					ModulePropertyManager.getPropertyManager(MODULE_NAME).getProperty(JMS_BANK_QUEUE));
+			logger.debug("sending text message to bank: " + quote.toString());
+			sender.sendAMessage(quote.getCSV());
+			sender.stop();
+		}catch (Exception e) {
+			logger.error(e);
+		}
+	}
+	
+	private int sendToCreditAgency(Customer customer) {
+		Message message = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
+		Message replyMessage=null;
+		int score =0;
+		
+		//convert our customer to a bean xml representation
+		//		XMLEncoder encoder=null;
+		//		try {
+		//			ByteArrayOutputStream bytes = new ByteArrayOutputStream();
+		//			ObjectOutputStream oos = new ObjectOutputStream(bytes);
+		//			encoder = new XMLEncoder(oos);
+		//			encoder.writeObject(wCustomer);
+		//			encoder.close();
+		//			System.out.println("encoded customer: "+ bytes.toString());
+		//		} catch (IOException e2) {
+		//			// TODO Auto-generated catch block
+		//			e2.printStackTrace();
+		//		}		
+		
+		//set the customer inside the message - csv format for now to test
+		message.getBody().setContents(customer.getCSV().getBytes());	
+		
+		try {
+			logger.debug("sending to credit agency");
+			//registry setup stuff
+			Registry registry = RegistryFactory.getRegistry();
+			String serviceCategoryName = ModulePropertyManager.getPropertyManager(MODULE_NAME).getProperty(SERVICE_CAT);
+			String serviceName = ModulePropertyManager.getPropertyManager(MODULE_NAME).getProperty(SERVICE_NAME);			
+			logger.debug("looking for the following service in the registry -- Category: " + serviceCategoryName);
+			logger.debug("looking for the following service in the registry -- Name: " + serviceName);
+			
+			//EPRs to use for delivery and reply messages
+			EPR toEPR=null, replyEPR=null;
+			
+			//find the service in the registry
+			toEPR = (JMSEpr)registry.findEPR(serviceCategoryName, serviceName);
+
+			//use a 2-way courier so we can grab the response
+//			TwoWayCourier courier = CourierFactory.getCourier(toEPR, null);			
+			Courier courier = CourierFactory.getCourier(toEPR);
+			
+//			if (message.getHeader().getCall()==null) {
+//				Call call = new Call();
+//				message.getHeader().setCall(call);
+//			}			
+			
+			if (null == courier) {
+				logger.info("could not get a valid courier to deliver the message");
+				throw new ActionProcessingException("could not find a courier to deliver the message for the serrvice " +
+						"(category-name: " + serviceCategoryName +"-" + serviceCategoryName); }			
+			
+//			replyEPR = CourierUtil.getTemporaryReplyToEpr(toEPR);
+//			message.getHeader().getCall().setReplyTo(replyEPR);		
+			if (courier.deliver(message)) {				
+//				courier.setReplyToEpr(replyEPR);
+//				replyMessage = courier.pickup(5000);	//TODO: replace with a time value from Config
+				if (replyMessage !=null) {
+					logger.debug("received reply from creditAgency action");
+					logger.debug("message received: " + replyMessage.getBody().getContents());
+					score = new Integer(new String(replyMessage.getBody().getContents())).intValue();
+					
+					
+				}
+			} else
+				throw new ActionProcessingException("error delivering the message to the credit agency");
+			
+			
+			
+//		}catch(CourierTimeoutException ex1) {
+//			logger.error("timeout occured waiting for creditAgency response -  " + ex1);
+		}catch (Exception ex2) {
+			logger.error("exception occured: " + ex2);
+			ex2.printStackTrace();
+		}
+		
+		return score;
+	}
+	
+	
+
+}

Added: labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/QuoteRequest.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/QuoteRequest.java	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/QuoteRequest.java	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,132 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.soa.esb.samples.trailblazer.loanbroker;
+
+import java.io.Serializable;
+
+
+public class QuoteRequest implements Serializable 
+{
+	private static final long serialVersionUID = 1L;
+	public int ssn;
+	public int creditScore;
+	public int creditHistoryLen;
+	public int amount;
+	public int term;
+	public String customerUniqueId;
+	public String customerEmail;
+	
+	/**
+	 * Gets for the credit score.
+	 * @return credit score
+	 */
+	public int getCreditScore() {
+		return creditScore;
+	}
+	/**
+	 * Sets the credit score.
+	 * @param creditScore
+	 */
+	public void setCreditScore(int creditScore) {
+		this.creditScore = creditScore;
+	}
+	/**
+	 * Gets the credit history length (in months).
+	 * @return credit history length
+	 */
+	public int getCreditHistoryLen() {
+		return creditHistoryLen;
+	}
+	/**
+	 * Sets the credit history length (in months).
+	 * @param creditHistoryLen
+	 */
+	public void setCreditHistoryLen(int historyLength) {
+		this.creditHistoryLen = historyLength;
+	}
+	/**
+	 * Gets the requested loan amount (in dollar).
+	 * @return the loan amount
+	 */
+	public int getAmount() {
+		return amount;
+	}
+	/** 
+	 * Sets the loan amount.
+	 * @param amount - the loan amount (in dollar).
+	 */
+	public void setAmount(int loanAmount) {
+		this.amount = loanAmount;
+	}
+	/**
+	 * Gets the duration of the loan, the term, (in months).
+	 * @return term
+	 */
+	public int getTerm() {
+		return term;
+	}
+	/**
+	 * Sets the term (duration) of the loan (in months)
+	 * @param term
+	 */
+	public void setTerm(int loanTerm) {
+		this.term = loanTerm;
+	}
+	/** 
+	 * Sets the Social Security Number (SSN).
+	 * @return ssn
+	 */
+	public int getSsn() {
+		return ssn;
+	}
+	/**
+	 * Sets the Social Security Number (SSN).
+	 * @param ssn
+	 */
+	public void setSsn(int ssn) {
+		this.ssn = ssn;
+	}
+	/**
+	 * Returns a human readable string representation of this object.
+	 * @return toString
+	 */
+	public String toString() {
+		return this.getClass().getSimpleName() + "=["
+			+ "ssn=" + ssn
+		    + ", creditScore=" + creditScore
+			+ ", creditHistoryLen=" + creditHistoryLen
+			+ ", amount=" + amount
+			+ ", term=" + term
+			+ ", customerUniqueId="+ customerUniqueId + "]";	
+	}
+	
+	public String getCSV() {
+		return (ssn+","+creditScore+","+creditHistoryLen+","+amount+","+term+","+ssn+","+customerEmail);
+	}
+	
+	public String getCustomerUniqueId() {
+		return customerUniqueId;
+	}
+	public void setCustomerUniqueId(String customerUID) {
+		this.customerUniqueId = customerUID;
+	}
+}

Added: labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/SendJMSMessage.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/SendJMSMessage.java	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/SendJMSMessage.java	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,56 @@
+package org.jboss.soa.esb.samples.trailblazer.loanbroker;
+
+import javax.jms.JMSException;
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.QueueSender;
+import javax.jms.QueueSession;
+import javax.jms.TextMessage;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+public class SendJMSMessage {
+    QueueConnection conn;
+    QueueSession session;
+    Queue que;
+    
+    
+    public void setupConnection(String queue) throws JMSException, NamingException
+    {
+    	InitialContext iniCtx = new InitialContext();
+    	Object tmp = iniCtx.lookup("ConnectionFactory");
+    	QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
+    	conn = qcf.createQueueConnection();
+    	que = (Queue) iniCtx.lookup(queue);
+    	session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+    	conn.start();
+    	System.out.println("Connection Started");
+    }
+    
+    public void stop() throws JMSException 
+    { 
+        conn.stop();
+        session.close();
+        conn.close();
+    }
+    
+    public void sendAMessage(String msg) throws JMSException {
+    	
+        QueueSender send = session.createSender(que);        
+        TextMessage tm = session.createTextMessage(msg);
+        send.send(tm);        
+        send.close();
+    }
+       
+    
+//    public static void main(String args[]) throws Exception
+//    {        	    	
+//    	SendJMSMessage sm = new SendJMSMessage();
+//    	sm.setupConnection();
+//    	sm.sendAMessage(args[0]); 
+//    	sm.stop();
+//    	
+//    }
+    
+}
\ No newline at end of file

Added: labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/LoanBrokerWS.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/LoanBrokerWS.java	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/LoanBrokerWS.java	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,80 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ * 
+ */
+package org.jboss.soa.esb.samples.trailblazer.web;
+
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.samples.trailblazer.loanbroker.LoanBroker;
+
+/**
+ * The Loan broker web service, which will handle a loan request. 
+ */
+ at WebService(name = "LoanBrokerWS", targetNamespace = "http://localhost/trailblazer")
+ at SOAPBinding(style = SOAPBinding.Style.RPC)
+public class LoanBrokerWS 
+{
+	
+	private static Logger logger = Logger.getLogger(LoanBrokerWS.class);
+		
+	@WebMethod
+	// method name is .NET friendly
+	public void RequestLoan(WebCustomer customer) {
+			
+			logger.info("WebCustomer received: \n" + customer);
+			
+			LoanBroker broker = new LoanBroker();
+			broker.processLoanRequest(customer);
+			
+			
+
+	}
+	
+	
+	private String getCSVFromCustomer(WebCustomer customer){
+		StringBuffer buff = new StringBuffer();
+		buff.append(customer.ssn);
+		buff.append(",");
+		buff.append(customer.name);
+		buff.append(",");
+		buff.append(customer.loanAmount);
+		buff.append(",");
+		buff.append(customer.loanDuration);
+		buff.append(",");
+		buff.append(customer.salary);
+		buff.append(",");
+		buff.append(customer.address);
+		buff.append(",");
+		buff.append(customer.email);
+		buff.append(",");
+		buff.append(customer.employerName);
+		return "";
+	}
+	
+	
+		
+
+}

Added: labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/WebCustomer.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/WebCustomer.java	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/WebCustomer.java	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,74 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+
+/*
+ * a simple web Customer to use in the web services call and not expose the internal esb Customer object
+ */
+package org.jboss.soa.esb.samples.trailblazer.web;
+
+import java.io.Serializable;
+
+/*
+ * WebCustomer represents the data captured in the client JSP page
+ */
+
+ at SuppressWarnings("serial")
+public class WebCustomer implements Serializable
+{
+	public	String	name	,address	,employerName;
+	public	double	salary	,loanAmount;
+	public	int		loanDuration;	
+	public int		ssn;
+	public String	email;
+	
+	
+	public WebCustomer(){}
+	
+	public WebCustomer(String name, String address, String employerName, double salary, int loanDuration, double loanAmount, int ssn,String email) 
+    {
+		this.name			= name;
+		this.address		= address;
+		this.employerName	= employerName;
+		this.salary			= salary;
+		this.loanAmount		= loanAmount;
+		this.loanDuration	= loanDuration;
+		this.ssn 			= ssn;
+		this.email			= email;		
+    }//_________________________________________
+	
+	public String toString() {
+		String ret = "-- WebCustomer details -- \n";
+		ret += "name: " + name + "\n";
+		ret += "address: " + address + "\n";
+		ret += "employerName: " + employerName + "\n";
+		ret += "salary: " + salary + "\n";
+		ret += "loanAmount: " + loanAmount + "\n";
+		ret += "loanDuration: " + loanDuration + "\n";
+		ret += "ssn: " + ssn + "\n";
+		ret += "email: " + email + "\n";
+		ret += "--------------------------";
+		
+		return ret;
+	}
+
+}

Added: labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/LoanBrokerWS.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/LoanBrokerWS.java	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/LoanBrokerWS.java	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,33 @@
+/**
+ * LoanBrokerWS.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis 1.3 Oct 05, 2005 (05:23:37 EDT) WSDL2Java emitter.
+ */
+
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated 
+ * by the @authors tag. All rights reserved. 
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors. 
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author mark.little at jboss.com
+ */
+
+package org.jboss.soa.esb.samples.trailblazer.web.generated;
+
+public interface LoanBrokerWS extends java.rmi.Remote {
+    public void requestLoan(org.jboss.soa.esb.samples.trailblazer.web.generated.WebCustomer webCustomer_1) throws java.rmi.RemoteException;
+}

Added: labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/LoanBrokerWSBindingStub.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/LoanBrokerWSBindingStub.java	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/LoanBrokerWSBindingStub.java	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,189 @@
+/**
+ * LoanBrokerWSBindingStub.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis 1.3 Oct 05, 2005 (05:23:37 EDT) WSDL2Java emitter.
+ */
+
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated 
+ * by the @authors tag. All rights reserved. 
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors. 
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author mark.little at jboss.com
+ */
+
+
+package org.jboss.soa.esb.samples.trailblazer.web.generated;
+
+public class LoanBrokerWSBindingStub extends org.apache.axis.client.Stub implements org.jboss.soa.esb.samples.trailblazer.web.generated.LoanBrokerWS {
+    private java.util.Vector cachedSerClasses = new java.util.Vector();
+    private java.util.Vector cachedSerQNames = new java.util.Vector();
+    private java.util.Vector cachedSerFactories = new java.util.Vector();
+    private java.util.Vector cachedDeserFactories = new java.util.Vector();
+
+    static org.apache.axis.description.OperationDesc [] _operations;
+
+    static {
+        _operations = new org.apache.axis.description.OperationDesc[1];
+        _initOperationDesc1();
+    }
+
+    private static void _initOperationDesc1(){
+        org.apache.axis.description.OperationDesc oper;
+        org.apache.axis.description.ParameterDesc param;
+        oper = new org.apache.axis.description.OperationDesc();
+        oper.setName("RequestLoan");
+        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "WebCustomer_1"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://localhost/trailblazer", "WebCustomer"), org.jboss.soa.esb.samples.trailblazer.web.generated.WebCustomer.class, false, false);
+        oper.addParameter(param);
+        oper.setReturnType(org.apache.axis.encoding.XMLType.AXIS_VOID);
+        oper.setStyle(org.apache.axis.constants.Style.RPC);
+        oper.setUse(org.apache.axis.constants.Use.LITERAL);
+        _operations[0] = oper;
+
+    }
+
+    public LoanBrokerWSBindingStub() throws org.apache.axis.AxisFault {
+         this(null);
+    }
+
+    public LoanBrokerWSBindingStub(java.net.URL endpointURL, javax.xml.rpc.Service service) throws org.apache.axis.AxisFault {
+         this(service);
+         super.cachedEndpoint = endpointURL;
+    }
+
+    @SuppressWarnings({ "unused", "unchecked" })
+    public LoanBrokerWSBindingStub(javax.xml.rpc.Service service) throws org.apache.axis.AxisFault {
+        if (service == null) {
+            super.service = new org.apache.axis.client.Service();
+        } else {
+            super.service = service;
+        }
+        ((org.apache.axis.client.Service)super.service).setTypeMappingVersion("1.2");
+            java.lang.Class cls;
+            javax.xml.namespace.QName qName;
+			javax.xml.namespace.QName qName2;
+            java.lang.Class beansf = org.apache.axis.encoding.ser.BeanSerializerFactory.class;
+            java.lang.Class beandf = org.apache.axis.encoding.ser.BeanDeserializerFactory.class;
+            java.lang.Class enumsf = org.apache.axis.encoding.ser.EnumSerializerFactory.class;
+            java.lang.Class enumdf = org.apache.axis.encoding.ser.EnumDeserializerFactory.class;
+            java.lang.Class arraysf = org.apache.axis.encoding.ser.ArraySerializerFactory.class;
+            java.lang.Class arraydf = org.apache.axis.encoding.ser.ArrayDeserializerFactory.class;
+            java.lang.Class simplesf = org.apache.axis.encoding.ser.SimpleSerializerFactory.class;
+            java.lang.Class simpledf = org.apache.axis.encoding.ser.SimpleDeserializerFactory.class;
+            java.lang.Class simplelistsf = org.apache.axis.encoding.ser.SimpleListSerializerFactory.class;
+            java.lang.Class simplelistdf = org.apache.axis.encoding.ser.SimpleListDeserializerFactory.class;
+            qName = new javax.xml.namespace.QName("http://localhost/trailblazer", "WebCustomer");
+            cachedSerQNames.add(qName);
+            cls = org.jboss.soa.esb.samples.trailblazer.web.generated.WebCustomer.class;
+            cachedSerClasses.add(cls);
+            cachedSerFactories.add(beansf);
+            cachedDeserFactories.add(beandf);
+
+    }
+
+    protected org.apache.axis.client.Call createCall() throws java.rmi.RemoteException {
+        try {
+            org.apache.axis.client.Call _call = super._createCall();
+            if (super.maintainSessionSet) {
+                _call.setMaintainSession(super.maintainSession);
+            }
+            if (super.cachedUsername != null) {
+                _call.setUsername(super.cachedUsername);
+            }
+            if (super.cachedPassword != null) {
+                _call.setPassword(super.cachedPassword);
+            }
+            if (super.cachedEndpoint != null) {
+                _call.setTargetEndpointAddress(super.cachedEndpoint);
+            }
+            if (super.cachedTimeout != null) {
+                _call.setTimeout(super.cachedTimeout);
+            }
+            if (super.cachedPortName != null) {
+                _call.setPortName(super.cachedPortName);
+            }
+            java.util.Enumeration keys = super.cachedProperties.keys();
+            while (keys.hasMoreElements()) {
+                java.lang.String key = (java.lang.String) keys.nextElement();
+                _call.setProperty(key, super.cachedProperties.get(key));
+            }
+            // All the type mapping information is registered
+            // when the first call is made.
+            // The type mapping information is actually registered in
+            // the TypeMappingRegistry of the service, which
+            // is the reason why registration is only needed for the first call.
+            synchronized (this) {
+                if (firstCall()) {
+                    // must set encoding style before registering serializers
+                    _call.setEncodingStyle(null);
+                    for (int i = 0; i < cachedSerFactories.size(); ++i) {
+                        java.lang.Class cls = (java.lang.Class) cachedSerClasses.get(i);
+                        javax.xml.namespace.QName qName =
+                                (javax.xml.namespace.QName) cachedSerQNames.get(i);
+                        java.lang.Object x = cachedSerFactories.get(i);
+                        if (x instanceof Class) {
+                            java.lang.Class sf = (java.lang.Class)
+                                 cachedSerFactories.get(i);
+                            java.lang.Class df = (java.lang.Class)
+                                 cachedDeserFactories.get(i);
+                            _call.registerTypeMapping(cls, qName, sf, df, false);
+                        }
+                        else if (x instanceof javax.xml.rpc.encoding.SerializerFactory) {
+                            org.apache.axis.encoding.SerializerFactory sf = (org.apache.axis.encoding.SerializerFactory)
+                                 cachedSerFactories.get(i);
+                            org.apache.axis.encoding.DeserializerFactory df = (org.apache.axis.encoding.DeserializerFactory)
+                                 cachedDeserFactories.get(i);
+                            _call.registerTypeMapping(cls, qName, sf, df, false);
+                        }
+                    }
+                }
+            }
+            return _call;
+        }
+        catch (java.lang.Throwable _t) {
+            throw new org.apache.axis.AxisFault("Failure trying to get the Call object", _t);
+        }
+    }
+
+    public void requestLoan(org.jboss.soa.esb.samples.trailblazer.web.generated.WebCustomer webCustomer_1) throws java.rmi.RemoteException {
+        if (super.cachedEndpoint == null) {
+            throw new org.apache.axis.NoEndPointException();
+        }
+        org.apache.axis.client.Call _call = createCall();
+        _call.setOperation(_operations[0]);
+        _call.setUseSOAPAction(true);
+        _call.setSOAPActionURI("");
+        _call.setEncodingStyle(null);
+        _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE);
+        _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
+        _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
+        _call.setOperationName(new javax.xml.namespace.QName("http://localhost/trailblazer", "RequestLoan"));
+
+        setRequestHeaders(_call);
+        setAttachments(_call);
+ try {        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {webCustomer_1});
+
+        if (_resp instanceof java.rmi.RemoteException) {
+            throw (java.rmi.RemoteException)_resp;
+        }
+        extractAttachments(_call);
+  } catch (org.apache.axis.AxisFault axisFaultException) {
+  throw axisFaultException;
+}
+    }
+
+}

Added: labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/LoanBrokerWSProxy.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/LoanBrokerWSProxy.java	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/LoanBrokerWSProxy.java	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,70 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated 
+ * by the @authors tag. All rights reserved. 
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors. 
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author mark.little at jboss.com
+ */
+
+package org.jboss.soa.esb.samples.trailblazer.web.generated;
+
+public class LoanBrokerWSProxy implements org.jboss.soa.esb.samples.trailblazer.web.generated.LoanBrokerWS {
+  private String _endpoint = null;
+  private org.jboss.soa.esb.samples.trailblazer.web.generated.LoanBrokerWS loanBrokerWS = null;
+  
+  public LoanBrokerWSProxy() {
+    _initLoanBrokerWSProxy();
+  }
+  
+  private void _initLoanBrokerWSProxy() {
+    try {
+      loanBrokerWS = (new org.jboss.soa.esb.samples.trailblazer.web.generated.LoanBrokerWSServiceLocator()).getLoanBrokerWSPort();
+      if (loanBrokerWS != null) {
+        if (_endpoint != null)
+          ((javax.xml.rpc.Stub)loanBrokerWS)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
+        else
+          _endpoint = (String)((javax.xml.rpc.Stub)loanBrokerWS)._getProperty("javax.xml.rpc.service.endpoint.address");
+      }
+      
+    }
+    catch (javax.xml.rpc.ServiceException serviceException) {}
+  }
+  
+  public String getEndpoint() {
+    return _endpoint;
+  }
+  
+  public void setEndpoint(String endpoint) {
+    _endpoint = endpoint;
+    if (loanBrokerWS != null)
+      ((javax.xml.rpc.Stub)loanBrokerWS)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
+    
+  }
+  
+  public org.jboss.soa.esb.samples.trailblazer.web.generated.LoanBrokerWS getLoanBrokerWS() {
+    if (loanBrokerWS == null)
+      _initLoanBrokerWSProxy();
+    return loanBrokerWS;
+  }
+  
+  public void requestLoan(org.jboss.soa.esb.samples.trailblazer.web.generated.WebCustomer webCustomer_1) throws java.rmi.RemoteException{
+    if (loanBrokerWS == null)
+      _initLoanBrokerWSProxy();
+    loanBrokerWS.requestLoan(webCustomer_1);
+  }
+  
+  
+}
\ No newline at end of file

Added: labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/LoanBrokerWSService.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/LoanBrokerWSService.java	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/LoanBrokerWSService.java	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,38 @@
+/**
+ * LoanBrokerWSService.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis 1.3 Oct 05, 2005 (05:23:37 EDT) WSDL2Java emitter.
+ */
+
+
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated 
+ * by the @authors tag. All rights reserved. 
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors. 
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author mark.little at jboss.com
+ */
+
+package org.jboss.soa.esb.samples.trailblazer.web.generated;
+
+public interface LoanBrokerWSService extends javax.xml.rpc.Service {
+    public java.lang.String getLoanBrokerWSPortAddress();
+
+    public org.jboss.soa.esb.samples.trailblazer.web.generated.LoanBrokerWS getLoanBrokerWSPort() throws javax.xml.rpc.ServiceException;
+
+    public org.jboss.soa.esb.samples.trailblazer.web.generated.LoanBrokerWS getLoanBrokerWSPort(java.net.URL portAddress) throws javax.xml.rpc.ServiceException;
+}

Added: labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/LoanBrokerWSServiceLocator.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/LoanBrokerWSServiceLocator.java	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/LoanBrokerWSServiceLocator.java	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,166 @@
+/**
+ * LoanBrokerWSServiceLocator.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis 1.3 Oct 05, 2005 (05:23:37 EDT) WSDL2Java emitter.
+ */
+
+
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated 
+ * by the @authors tag. All rights reserved. 
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors. 
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author mark.little at jboss.com
+ */
+
+package org.jboss.soa.esb.samples.trailblazer.web.generated;
+
+ at SuppressWarnings("serial")
+public class LoanBrokerWSServiceLocator extends org.apache.axis.client.Service implements org.jboss.soa.esb.samples.trailblazer.web.generated.LoanBrokerWSService {
+
+    public LoanBrokerWSServiceLocator() {
+    }
+
+
+    public LoanBrokerWSServiceLocator(org.apache.axis.EngineConfiguration config) {
+        super(config);
+    }
+
+    public LoanBrokerWSServiceLocator(java.lang.String wsdlLoc, javax.xml.namespace.QName sName) throws javax.xml.rpc.ServiceException {
+        super(wsdlLoc, sName);
+    }
+
+    // Use to get a proxy class for LoanBrokerWSPort
+    private java.lang.String LoanBrokerWSPort_address = "http://localhost:8080/trailblazer/LoanBrokerWS";
+
+    public java.lang.String getLoanBrokerWSPortAddress() {
+        return LoanBrokerWSPort_address;
+    }
+
+    // The WSDD service name defaults to the port name.
+    private java.lang.String LoanBrokerWSPortWSDDServiceName = "LoanBrokerWSPort";
+
+    public java.lang.String getLoanBrokerWSPortWSDDServiceName() {
+        return LoanBrokerWSPortWSDDServiceName;
+    }
+
+    public void setLoanBrokerWSPortWSDDServiceName(java.lang.String name) {
+        LoanBrokerWSPortWSDDServiceName = name;
+    }
+
+    public org.jboss.soa.esb.samples.trailblazer.web.generated.LoanBrokerWS getLoanBrokerWSPort() throws javax.xml.rpc.ServiceException {
+       java.net.URL endpoint;
+        try {
+            endpoint = new java.net.URL(LoanBrokerWSPort_address);
+        }
+        catch (java.net.MalformedURLException e) {
+            throw new javax.xml.rpc.ServiceException(e);
+        }
+        return getLoanBrokerWSPort(endpoint);
+    }
+
+    public org.jboss.soa.esb.samples.trailblazer.web.generated.LoanBrokerWS getLoanBrokerWSPort(java.net.URL portAddress) throws javax.xml.rpc.ServiceException {
+        try {
+            org.jboss.soa.esb.samples.trailblazer.web.generated.LoanBrokerWSBindingStub _stub = new org.jboss.soa.esb.samples.trailblazer.web.generated.LoanBrokerWSBindingStub(portAddress, this);
+            _stub.setPortName(getLoanBrokerWSPortWSDDServiceName());
+            return _stub;
+        }
+        catch (org.apache.axis.AxisFault e) {
+            return null;
+        }
+    }
+
+    public void setLoanBrokerWSPortEndpointAddress(java.lang.String address) {
+        LoanBrokerWSPort_address = address;
+    }
+
+    /**
+     * For the given interface, get the stub implementation.
+     * If this service has no port for the given interface,
+     * then ServiceException is thrown.
+     */
+    public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
+        try {
+            if (org.jboss.soa.esb.samples.trailblazer.web.generated.LoanBrokerWS.class.isAssignableFrom(serviceEndpointInterface)) {
+                org.jboss.soa.esb.samples.trailblazer.web.generated.LoanBrokerWSBindingStub _stub = new org.jboss.soa.esb.samples.trailblazer.web.generated.LoanBrokerWSBindingStub(new java.net.URL(LoanBrokerWSPort_address), this);
+                _stub.setPortName(getLoanBrokerWSPortWSDDServiceName());
+                return _stub;
+            }
+        }
+        catch (java.lang.Throwable t) {
+            throw new javax.xml.rpc.ServiceException(t);
+        }
+        throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface:  " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()));
+    }
+
+    /**
+     * For the given interface, get the stub implementation.
+     * If this service has no port for the given interface,
+     * then ServiceException is thrown.
+     */
+    public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
+        if (portName == null) {
+            return getPort(serviceEndpointInterface);
+        }
+        java.lang.String inputPortName = portName.getLocalPart();
+        if ("LoanBrokerWSPort".equals(inputPortName)) {
+            return getLoanBrokerWSPort();
+        }
+        else  {
+            java.rmi.Remote _stub = getPort(serviceEndpointInterface);
+            ((org.apache.axis.client.Stub) _stub).setPortName(portName);
+            return _stub;
+        }
+    }
+
+    public javax.xml.namespace.QName getServiceName() {
+        return new javax.xml.namespace.QName("http://localhost/trailblazer", "LoanBrokerWSService");
+    }
+
+    private java.util.HashSet ports = null;
+
+    @SuppressWarnings("unchecked")
+	public java.util.Iterator getPorts() {
+        if (ports == null) {
+            ports = new java.util.HashSet();
+            ports.add(new javax.xml.namespace.QName("http://localhost/trailblazer", "LoanBrokerWSPort"));
+        }
+        return ports.iterator();
+    }
+
+    /**
+    * Set the endpoint address for the specified port name.
+    */
+    public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
+        
+if ("LoanBrokerWSPort".equals(portName)) {
+            setLoanBrokerWSPortEndpointAddress(address);
+        }
+        else 
+{ // Unknown Port Name
+            throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
+        }
+    }
+
+    /**
+    * Set the endpoint address for the specified port name.
+    */
+    public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
+        setEndpointAddress(portName.getLocalPart(), address);
+    }
+
+}

Added: labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/WebCustomer.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/WebCustomer.java	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/web/generated/WebCustomer.java	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,378 @@
+/**
+ * WebCustomer.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis 1.3 Oct 05, 2005 (05:23:37 EDT) WSDL2Java emitter.
+ */
+
+
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated 
+ * by the @authors tag. All rights reserved. 
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors. 
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author mark.little at jboss.com
+ */
+
+package org.jboss.soa.esb.samples.trailblazer.web.generated;
+
+ at SuppressWarnings("serial")
+public class WebCustomer  implements java.io.Serializable {
+    private java.lang.String address;
+
+    private java.lang.String email;
+
+    private java.lang.String employerName;
+
+    private double loanAmount;
+
+    private int loanDuration;
+
+    private java.lang.String name;
+
+    private double salary;
+
+    private int ssn;
+
+    public WebCustomer() {
+    }
+
+    public WebCustomer(
+           java.lang.String address,
+           java.lang.String email,
+           java.lang.String employerName,
+           double loanAmount,
+           int loanDuration,
+           java.lang.String name,
+           double salary,
+           int ssn) {
+           this.address = address;
+           this.email = email;
+           this.employerName = employerName;
+           this.loanAmount = loanAmount;
+           this.loanDuration = loanDuration;
+           this.name = name;
+           this.salary = salary;
+           this.ssn = ssn;
+    }
+
+
+    /**
+     * Gets the address value for this WebCustomer.
+     * 
+     * @return address
+     */
+    public java.lang.String getAddress() {
+        return address;
+    }
+
+
+    /**
+     * Sets the address value for this WebCustomer.
+     * 
+     * @param address
+     */
+    public void setAddress(java.lang.String address) {
+        this.address = address;
+    }
+
+
+    /**
+     * Gets the email value for this WebCustomer.
+     * 
+     * @return email
+     */
+    public java.lang.String getEmail() {
+        return email;
+    }
+
+
+    /**
+     * Sets the email value for this WebCustomer.
+     * 
+     * @param email
+     */
+    public void setEmail(java.lang.String email) {
+        this.email = email;
+    }
+
+
+    /**
+     * Gets the employerName value for this WebCustomer.
+     * 
+     * @return employerName
+     */
+    public java.lang.String getEmployerName() {
+        return employerName;
+    }
+
+
+    /**
+     * Sets the employerName value for this WebCustomer.
+     * 
+     * @param employerName
+     */
+    public void setEmployerName(java.lang.String employerName) {
+        this.employerName = employerName;
+    }
+
+
+    /**
+     * Gets the loanAmount value for this WebCustomer.
+     * 
+     * @return loanAmount
+     */
+    public double getLoanAmount() {
+        return loanAmount;
+    }
+
+
+    /**
+     * Sets the loanAmount value for this WebCustomer.
+     * 
+     * @param loanAmount
+     */
+    public void setLoanAmount(double loanAmount) {
+        this.loanAmount = loanAmount;
+    }
+
+
+    /**
+     * Gets the loanDuration value for this WebCustomer.
+     * 
+     * @return loanDuration
+     */
+    public int getLoanDuration() {
+        return loanDuration;
+    }
+
+
+    /**
+     * Sets the loanDuration value for this WebCustomer.
+     * 
+     * @param loanDuration
+     */
+    public void setLoanDuration(int loanDuration) {
+        this.loanDuration = loanDuration;
+    }
+
+
+    /**
+     * Gets the name value for this WebCustomer.
+     * 
+     * @return name
+     */
+    public java.lang.String getName() {
+        return name;
+    }
+
+
+    /**
+     * Sets the name value for this WebCustomer.
+     * 
+     * @param name
+     */
+    public void setName(java.lang.String name) {
+        this.name = name;
+    }
+
+
+    /**
+     * Gets the salary value for this WebCustomer.
+     * 
+     * @return salary
+     */
+    public double getSalary() {
+        return salary;
+    }
+
+
+    /**
+     * Sets the salary value for this WebCustomer.
+     * 
+     * @param salary
+     */
+    public void setSalary(double salary) {
+        this.salary = salary;
+    }
+
+
+    /**
+     * Gets the ssn value for this WebCustomer.
+     * 
+     * @return ssn
+     */
+    public int getSsn() {
+        return ssn;
+    }
+
+
+    /**
+     * Sets the ssn value for this WebCustomer.
+     * 
+     * @param ssn
+     */
+    public void setSsn(int ssn) {
+        this.ssn = ssn;
+    }
+
+    private java.lang.Object __equalsCalc = null;
+    public synchronized boolean equals(java.lang.Object obj) {
+        if (!(obj instanceof WebCustomer)) return false;
+        WebCustomer other = (WebCustomer) obj;
+        if (obj == null) return false;
+        if (this == obj) return true;
+        if (__equalsCalc != null) {
+            return (__equalsCalc == obj);
+        }
+        __equalsCalc = obj;
+        boolean _equals;
+        _equals = true && 
+            ((this.address==null && other.getAddress()==null) || 
+             (this.address!=null &&
+              this.address.equals(other.getAddress()))) &&
+            ((this.email==null && other.getEmail()==null) || 
+             (this.email!=null &&
+              this.email.equals(other.getEmail()))) &&
+            ((this.employerName==null && other.getEmployerName()==null) || 
+             (this.employerName!=null &&
+              this.employerName.equals(other.getEmployerName()))) &&
+            this.loanAmount == other.getLoanAmount() &&
+            this.loanDuration == other.getLoanDuration() &&
+            ((this.name==null && other.getName()==null) || 
+             (this.name!=null &&
+              this.name.equals(other.getName()))) &&
+            this.salary == other.getSalary() &&
+            this.ssn == other.getSsn();
+        __equalsCalc = null;
+        return _equals;
+    }
+
+    private boolean __hashCodeCalc = false;
+    public synchronized int hashCode() {
+        if (__hashCodeCalc) {
+            return 0;
+        }
+        __hashCodeCalc = true;
+        int _hashCode = 1;
+        if (getAddress() != null) {
+            _hashCode += getAddress().hashCode();
+        }
+        if (getEmail() != null) {
+            _hashCode += getEmail().hashCode();
+        }
+        if (getEmployerName() != null) {
+            _hashCode += getEmployerName().hashCode();
+        }
+        _hashCode += new Double(getLoanAmount()).hashCode();
+        _hashCode += getLoanDuration();
+        if (getName() != null) {
+            _hashCode += getName().hashCode();
+        }
+        _hashCode += new Double(getSalary()).hashCode();
+        _hashCode += getSsn();
+        __hashCodeCalc = false;
+        return _hashCode;
+    }
+
+    // Type metadata
+    private static org.apache.axis.description.TypeDesc typeDesc =
+        new org.apache.axis.description.TypeDesc(WebCustomer.class, true);
+
+    static {
+        typeDesc.setXmlType(new javax.xml.namespace.QName("http://localhost/trailblazer", "WebCustomer"));
+        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("address");
+        elemField.setXmlName(new javax.xml.namespace.QName("http://localhost/trailblazer", "address"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        elemField.setNillable(true);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("email");
+        elemField.setXmlName(new javax.xml.namespace.QName("http://localhost/trailblazer", "email"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        elemField.setNillable(true);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("employerName");
+        elemField.setXmlName(new javax.xml.namespace.QName("http://localhost/trailblazer", "employerName"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        elemField.setNillable(true);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("loanAmount");
+        elemField.setXmlName(new javax.xml.namespace.QName("http://localhost/trailblazer", "loanAmount"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "double"));
+        elemField.setNillable(false);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("loanDuration");
+        elemField.setXmlName(new javax.xml.namespace.QName("http://localhost/trailblazer", "loanDuration"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
+        elemField.setNillable(false);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("name");
+        elemField.setXmlName(new javax.xml.namespace.QName("http://localhost/trailblazer", "name"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        elemField.setNillable(true);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("salary");
+        elemField.setXmlName(new javax.xml.namespace.QName("http://localhost/trailblazer", "salary"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "double"));
+        elemField.setNillable(false);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("ssn");
+        elemField.setXmlName(new javax.xml.namespace.QName("http://localhost/trailblazer", "ssn"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
+        elemField.setNillable(false);
+        typeDesc.addFieldDesc(elemField);
+    }
+
+    /**
+     * Return type metadata object
+     */
+    public static org.apache.axis.description.TypeDesc getTypeDesc() {
+        return typeDesc;
+    }
+
+    /**
+     * Get Custom Serializer
+     */
+    public static org.apache.axis.encoding.Serializer getSerializer(
+           java.lang.String mechType, 
+           java.lang.Class _javaType,  
+           javax.xml.namespace.QName _xmlType) {
+        return 
+          new  org.apache.axis.encoding.ser.BeanSerializer(
+            _javaType, _xmlType, typeDesc);
+    }
+
+    /**
+     * Get Custom Deserializer
+     */
+    public static org.apache.axis.encoding.Deserializer getDeserializer(
+           java.lang.String mechType, 
+           java.lang.Class _javaType,  
+           javax.xml.namespace.QName _xmlType) {
+        return 
+          new  org.apache.axis.encoding.ser.BeanDeserializer(
+            _javaType, _xmlType, typeDesc);
+    }
+
+}

Added: labs/jbossesb/trunk/product/samples/trailblazer/docs/sequence-diagram-overview.pdf
===================================================================
(Binary files differ)


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/docs/sequence-diagram-overview.pdf
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbossesb/trunk/product/samples/trailblazer/esb/build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/esb/build.xml	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/esb/build.xml	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,98 @@
+<project name="TRAILBLAZER" default="org.jboss.esb.samples.trailblazer.esb.compile" basedir=".">
+
+	<property name="org.jboss.soa.samples.trailblazer.esb_home"	 	value="../../.."/>
+	<property name="org.jboss.esb.samples.trailblazer.esb.dest"        	value="${basedir}/build"/>
+	<property name="org.jboss.esb.samples.trailblazer.esb.classes.dir" 	value="${basedir}/build/classes/esb/"/>
+	<property name="org.jboss.esb.samples.trailblazer.esb.testclasses.dir"  value="${basedir}/build/classes/tests/"/>
+	<property name="org.jboss.esb.samples.trailblazer.esb.src.dir"          value="${basedir}/src"/>
+	<property name="org.jboss.esb.samples.trailblazer.esb.test.dir"         value="${basedir}/test"/>
+	<property name="org.jboss.esb.samples.trailblazer.esb.lib.dir"      	value="${basedir}/lib"/>
+	<property name="org.jboss.esb.samples.trailblazer.esb.tests.report.dir" value="${basedir}/build/tests"/>
+
+	<!-- UPDATE THIS WITH YOUR JBOSS_HOME -->
+	<property name="org.jboss.soa.samples.trailblazer.jboss_home" 		value="/usr/local/jboss-4.0.4"/>
+
+	<property environment="env" />
+
+	<!-- Build from ESB source? -->
+	<property name="org.jboss.soa.esb.lib.dir" value="${org.jboss.soa.esb.samples.trailblazer.esb_home}/build/jbossesb/lib"/>
+	<condition property="org.jboss.soa.esb.lib.dir" value="${org.jboss.soa.samples.trailblazer.esb_home}/lib">
+		<equals arg1="${org.jboss.soa.esb.buildfrom.distribution}" arg2="yes"/>
+	</condition>			
+	
+
+	<!-- classpath -->
+	<path id="org.jboss.esb.samples.trailblazer.esb.classpath">
+		<fileset dir="${org.jboss.esb.samples.trailblazer.esb.lib.dir}/ext" includes="*.jar"/>
+		<fileset dir="${org.jboss.soa.esb.lib.dir}/ext" includes="*.jar"/>
+		<fileset dir="${org.jboss.soa.samples.trailblazer.jboss_home}/client" includes="jbossall-client.jar jbossws-client.jar mail.jar"/>
+		<fileset dir="${org.jboss.soa.samples.trailblazer.esb_home}/build/jbossesb/lib" includes="*.jar"/>
+	</path>
+
+	<!-- classpath for running the listener-->
+	<path id="org.jboss.esb.samples.trailblazer.esb.classpath.run">
+		<fileset dir="${org.jboss.esb.samples.trailblazer.esb.dest}/dist" includes="trailblazer-esb.jar"/>
+		<fileset dir="${org.jboss.soa.samples.trailblazer.esb_home}/lib/ext" includes="*.jar"/>
+		<fileset dir="${org.jboss.soa.esb.lib.dir}/ext" includes="*.jar"/>
+		<!-- for finding the jbossesb-properties.xml file -->
+		<fileset dir="${org.jboss.soa.samples.trailblazer.esb_home}/install/conf" includes="*.jar"/>	
+	</path>
+
+	<target name="clean">
+		<delete dir="${org.jboss.esb.samples.trailblazer.esb.dest}" />
+	</target>
+	
+	<!-- =================================================================== -->
+	<!-- Prepares the directory structure                                    -->
+	<!-- =================================================================== -->
+	<target name="org.jboss.esb.samples.trailblazer.esb.prepare">
+		<mkdir dir="${org.jboss.esb.samples.trailblazer.esb.dest}"/>
+		<mkdir dir="${org.jboss.esb.samples.trailblazer.esb.dest}/dist"/>
+		<mkdir dir="${org.jboss.esb.samples.trailblazer.esb.dest}/classes/esb"/>
+	</target>
+
+	<!-- Compilation targets -->
+	<target name="org.jboss.esb.samples.trailblazer.esb.compile" depends="org.jboss.esb.samples.trailblazer.esb.prepare"
+		description="Compile all classes">
+
+		<javac
+		            destdir="${org.jboss.esb.samples.trailblazer.esb.classes.dir}"
+		            classpathref="org.jboss.esb.samples.trailblazer.esb.classpath"
+		        	debug="true"
+		        	>
+			<src path="${org.jboss.esb.samples.trailblazer.esb.src.dir}"/>
+		</javac>
+
+	</target>
+
+	<!-- javadocs paths -->
+	<path id="org.jboss.esb.samples.trailblazer.esb.javadocs.path">
+		<pathelement path="esb/classes"/>
+	</path>
+
+	<!-- Jar targets -->
+	<target name="org.jboss.esb.samples.trailblazer.esb.jar" depends="org.jboss.esb.samples.trailblazer.esb.compile" >
+		<echo message="Building Trailblazer ESB jar file"/>
+		<delete file="${org.jboss.esb.samples.trailblazer.esb.dest}/dist/trailblazer-esb.jar" />
+		<jar    destfile="${org.jboss.esb.samples.trailblazer.esb.dest}/dist/trailblazer-esb.jar" 
+                basedir="${org.jboss.esb.samples.trailblazer.esb.classes.dir}" 
+                includes="**/*.class" excludes="**/web/*.class"
+                />
+	</target>
+
+	<!-- Short target names -->
+	<target name="compile" depends="org.jboss.esb.samples.trailblazer.esb.compile"/>
+	<target name="jar" depends="org.jboss.esb.samples.trailblazer.esb.jar"/>
+
+	<!-- run the listener -->
+	<target name="runESB" depends="org.jboss.esb.samples.trailblazer.esb.jar">
+		<echo>Running ESB Trailblazer listeners</echo>
+		<java fork="yes" classname="org.jboss.soa.esb.samples.trailblazer.util.Launcher" failonerror="true" 
+			args="10 /home/dbrum/dev/jbossesb/product/samples/trailblazer2/conf/jbossesb-trailblazer.xml">
+			<classpath refid="org.jboss.esb.samples.trailblazer.esb.classpath"/>
+			<classpath refid="org.jboss.esb.samples.trailblazer.esb.classpath.run"/>
+		</java>
+	</target>
+
+		
+</project>

Added: labs/jbossesb/trunk/product/samples/trailblazer/esb/conf/jbossesb-gateway.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/esb/conf/jbossesb-gateway.xml	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/esb/conf/jbossesb-gateway.xml	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,15 @@
+<jms-banks-gateway parameterReloadSecs="50">
+	<esb-jms-gateway 
+		target-service-category="trailblazer-jmsbank" 
+		target-service-name="jmsbankreplies" 
+		gatewayClass="org.jboss.soa.esb.listeners.gateway.JmsGatewayListener" 
+		connection-factory="ConnectionFactory" 
+		destination-type="queue" 
+		destination-name="queue/D" 
+		jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
+		jndi-URL="localhost">
+	<!--  no action needed as the inbound message is automatically converted
+     and sent to the queue for the target service
+  --> 
+  	</esb-jms-gateway>
+</jms-banks-gateway>

Added: labs/jbossesb/trunk/product/samples/trailblazer/esb/conf/jbossesb-listener.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/esb/conf/jbossesb-listener.xml	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/esb/conf/jbossesb-listener.xml	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,37 @@
+<Trailblazer parameterReloadSecs="20">
+
+   <CreditCheck
+		service-category="trailblazer"
+		service-name="creditagency"
+	   	listenerClass="org.jboss.soa.esb.listeners.message.JmsQueueListener"
+		connection-factory="ConnectionFactory"
+		destination-type="queue"
+	   	destination-name="queue/A"
+		jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
+		jndi-URL="localhost"	
+		message-selector="service='creditAgency'"
+		maxThreads="1"
+	    >        
+	    <action class="org.jboss.soa.esb.samples.trailblazer.actions.CreditAgencyActions" process="processCreditRequest"/>
+    
+   </CreditCheck>
+   
+
+   <JMSBankResponse
+		service-category="trailblazer-jmsbank"
+		service-name="jmsbankreplies"
+	   	listenerClass="org.jboss.soa.esb.listeners.message.JmsQueueListener"
+		connection-factory="ConnectionFactory"
+		destination-type="queue"
+	   	destination-name="queue/E"
+		jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
+		jndi-URL="localhost"	
+		maxThreads="1">
+		
+		<action class="org.jboss.soa.esb.samples.trailblazer.actions.BankResponseActions" process="processResponseFromJMSBank"/>
+    
+   </JMSBankResponse>
+   
+   
+   
+</Trailblazer>

Added: labs/jbossesb/trunk/product/samples/trailblazer/esb/lib/ext/c3p0-0.9.1-pre9.jar
===================================================================
(Binary files differ)


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/esb/lib/ext/c3p0-0.9.1-pre9.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbossesb/trunk/product/samples/trailblazer/esb/lib/ext/commons-logging.jar
===================================================================
(Binary files differ)


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/esb/lib/ext/commons-logging.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbossesb/trunk/product/samples/trailblazer/esb/lib/ext/hsqldb.jar
===================================================================
(Binary files differ)


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/esb/lib/ext/hsqldb.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbossesb/trunk/product/samples/trailblazer/esb/lib/ext/milyn-smooks-csv-0.1.jar
===================================================================
(Binary files differ)


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/esb/lib/ext/milyn-smooks-csv-0.1.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbossesb/trunk/product/samples/trailblazer/esb/lib/ext/opencsv-1.6.jar
===================================================================
(Binary files differ)


Property changes on: labs/jbossesb/trunk/product/samples/trailblazer/esb/lib/ext/opencsv-1.6.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbossesb/trunk/product/samples/trailblazer/esb/log4j.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/esb/log4j.xml	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/esb/log4j.xml	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,246 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  Log4j Configuration                                                  -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+<!-- $Id: log4j.xml,v 1.26.2.10 2006/04/21 17:29:20 csuconic Exp $ -->
+
+<!--
+   | For more configuration infromation and examples see the Jakarta Log4j
+   | owebsite: http://jakarta.apache.org/log4j
+ -->
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+   <!-- ================================= -->
+   <!-- Preserve messages in a local file -->
+   <!-- ================================= -->
+
+   <!-- A time/date based rolling appender -->
+   <appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender">
+      <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+      <param name="File" value="./trailblazer.log"/>
+      <param name="Append" value="false"/>
+
+      <!-- Rollover at midnight each day -->
+      <param name="DatePattern" value="'.'yyyy-MM-dd"/>
+
+      <!-- Rollover at the top of each hour
+      <param name="DatePattern" value="'.'yyyy-MM-dd-HH"/>
+      -->
+
+      <layout class="org.apache.log4j.PatternLayout">
+         <!-- The default pattern: Date Priority [Category] Message\n -->
+         <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
+
+         <!-- The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n
+         <param name="ConversionPattern" value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
+          -->
+      </layout>
+   </appender>
+
+   <!-- A size based file rolling appender
+   <appender name="FILE" class="org.jboss.logging.appender.RollingFileAppender">
+     <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+     <param name="File" value="${jboss.server.log.dir}/server.log"/>
+     <param name="Append" value="false"/>
+     <param name="MaxFileSize" value="500KB"/>
+     <param name="MaxBackupIndex" value="1"/>
+
+     <layout class="org.apache.log4j.PatternLayout">
+       <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
+     </layout>	    
+   </appender>
+   -->
+
+   <!-- ============================== -->
+   <!-- Append messages to the console -->
+   <!-- ============================== -->
+
+   <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+      <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+      <param name="Target" value="System.out"/>
+
+      <layout class="org.apache.log4j.PatternLayout">
+         <!-- The default pattern: Date Priority [Category] Message\n -->
+         <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
+      </layout>
+   </appender>
+
+   <!-- ====================== -->
+   <!-- More Appender examples -->
+   <!-- ====================== -->
+
+   <!-- Buffer events and log them asynchronously
+   <appender name="ASYNC" class="org.apache.log4j.AsyncAppender">
+     <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+     <appender-ref ref="FILE"/>
+     <appender-ref ref="CONSOLE"/>
+     <appender-ref ref="SMTP"/>
+   </appender>
+   -->
+
+   <!-- EMail events to an administrator
+   <appender name="SMTP" class="org.apache.log4j.net.SMTPAppender">
+     <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+     <param name="Threshold" value="ERROR"/>
+     <param name="To" value="admin at myhost.domain.com"/>
+     <param name="From" value="nobody at myhost.domain.com"/>
+     <param name="Subject" value="JBoss Sever Errors"/>
+     <param name="SMTPHost" value="localhost"/>
+     <param name="BufferSize" value="10"/>
+     <layout class="org.apache.log4j.PatternLayout">
+       <param name="ConversionPattern" value="[%d{ABSOLUTE},%c{1}] %m%n"/>
+     </layout>
+   </appender>
+   -->
+
+   <!-- Syslog events
+   <appender name="SYSLOG" class="org.apache.log4j.net.SyslogAppender">
+     <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+     <param name="Facility" value="LOCAL7"/>
+     <param name="FacilityPrinting" value="true"/>
+     <param name="SyslogHost" value="localhost"/>
+     <layout class="org.apache.log4j.PatternLayout">
+       <param name="ConversionPattern" value="[%d{ABSOLUTE},%c{1}] %m%n"/>
+     </layout>
+   </appender>
+   -->
+
+   <!-- Log events to JMS (requires a topic to be created)
+   <appender name="JMS" class="org.apache.log4j.net.JMSAppender">
+     <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+     <param name="Threshold" value="ERROR"/>
+     <param name="TopicConnectionFactoryBindingName" value="java:/ConnectionFactory"/>
+     <param name="TopicBindingName" value="topic/MyErrorsTopic"/>
+   </appender>
+   -->
+
+   <!-- Log events through SNMP
+   <appender name="TRAP_LOG" class="org.apache.log4j.ext.SNMPTrapAppender">
+     <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+     <param name="ImplementationClassName" value="org.apache.log4j.ext.JoeSNMPTrapSender"/>
+     <param name="ManagementHost" value="127.0.0.1"/>
+     <param name="ManagementHostTrapListenPort" value="162"/>
+     <param name="EnterpriseOID" value="1.3.6.1.4.1.24.0"/>
+     <param name="LocalIPAddress" value="127.0.0.1"/>
+     <param name="LocalTrapSendPort" value="161"/>
+     <param name="GenericTrapType" value="6"/>
+     <param name="SpecificTrapType" value="12345678"/>
+     <param name="CommunityString" value="public"/>
+     <param name="ForwardStackTraceWithTrap" value="true"/>
+     <param name="Threshold" value="DEBUG"/>
+     <param name="ApplicationTrapOID" value="1.3.6.1.4.1.24.12.10.22.64"/>
+     <layout class="org.apache.log4j.PatternLayout">
+            <param name="ConversionPattern" value="%d,%p,[%t],[%c],%m%n"/>
+     </layout>
+   </appender>
+   -->
+
+   <!--  Emit events as JMX notifications
+   <appender name="JMX" class="org.jboss.monitor.services.JMXNotificationAppender">
+      <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+      
+      <param name="Threshold" value="WARN"/>
+      <param name="ObjectName" value="jboss.system:service=Logging,type=JMXNotificationAppender"/>
+      
+      <layout class="org.apache.log4j.PatternLayout">
+         <param name="ConversionPattern" value="%d %-5p [%c] %m"/>
+      </layout>
+   </appender>
+   -->
+   
+   <!-- ================ -->
+   <!-- Limit categories -->
+   <!-- ================ -->
+
+   <!-- Limit the org.apache category to INFO as its DEBUG is verbose -->
+   <category name="org.apache">
+      <priority value="INFO"/>
+   </category>
+
+   <!-- Limit the org.jboss.serial (jboss-serialization) to INFO as its DEBUG is verbose -->
+   <category name="org.jboss.serial">
+      <priority value="INFO"/>
+   </category>
+
+   <!-- Limit the org.jgroups category to WARN as its INFO is verbose -->
+   <category name="org.jgroups">
+      <priority value="WARN"/>
+   </category>
+
+   <!-- Limit the jacorb category to WARN as its INFO is verbose -->
+   <category name="jacorb">
+      <priority value="WARN"/>
+   </category>
+   
+
+   <!-- Limit the JSR77 categories -->
+   <category name="org.jboss.management">
+      <priority value="INFO"/>
+   </category>
+
+   <!-- Limit Axis based webservice category -->
+   <category name="org.jboss.webservice">
+      <priority value="DEBUG"/>
+   </category>
+   <category name="org.jboss.axis">
+      <priority value="INFO"/>
+   </category>
+
+   <category name="org.milyn">
+      <priority value="INFO"/>
+   </category>
+   <category name="org.milyn.delivery.SmooksXML">
+      <priority value="INFO"/>
+   </category>
+   <category name="org.milyn.delivery.serialize.Serializer">
+      <priority value="INFO"/>
+   </category>
+   <category name="org.milyn.cdr.XMLConfigDigester">
+      <priority value="INFO"/>
+   </category>
+   <category name="org.jboss.soa.esb.samples.trailblazer">
+      <priority value="INFO"/>
+   </category>
+
+
+   <!-- ======================= -->
+   <!-- Setup the Root category -->
+   <!-- ======================= -->
+
+   <root>
+      <appender-ref ref="CONSOLE"/>
+      <appender-ref ref="FILE"/>
+   </root>
+
+   <!-- Clustering logging -->
+   <!-- Uncomment the following to redirect the org.jgroups and
+      org.jboss.ha categories to a cluster.log file.
+
+   <appender name="CLUSTER" class="org.jboss.logging.appender.RollingFileAppender">
+     <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+     <param name="File" value="${jboss.server.log.dir}/cluster.log"/>
+     <param name="Append" value="false"/>
+     <param name="MaxFileSize" value="500KB"/>
+     <param name="MaxBackupIndex" value="1"/>
+
+     <layout class="org.apache.log4j.PatternLayout">
+       <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
+     </layout>
+   </appender>
+   <category name="org.jgroups">
+     <priority value="DEBUG" />
+     <appender-ref ref="CLUSTER"/>
+   </category>
+   <category name="org.jboss.ha">
+     <priority value="DEBUG" />
+     <appender-ref ref="CLUSTER"/>
+   </category>
+   -->
+
+</log4j:configuration>

Added: labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/actions/BankResponseActions.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/actions/BankResponseActions.java	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/actions/BankResponseActions.java	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,64 @@
+package org.jboss.soa.esb.samples.trailblazer.actions;
+
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated 
+ * by the @authors tag. All rights reserved. 
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors. 
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @author mark.little at jboss.com
+ */
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.samples.trailblazer.util.ProcessEmail;
+
+public class BankResponseActions {
+	
+	protected Message 		_message;
+	protected ConfigTree	_config;
+	
+	private static Logger _logger = Logger.getLogger(BankResponseActions.class);
+	
+	public BankResponseActions(ConfigTree config) { _config = config; }
+	
+	public Message processResponseFromJMSBank(Message message) throws Exception {
+		_message = message;
+		
+		_logger.debug("message received: \n" + new String(message.getBody().getContents()));
+		
+		//get the response from the bank and set it in the customer
+		ConfigTree tree = ConfigTree.fromXml(new String(message.getBody().getContents()));		
+		String quoteID = tree.getFirstTextChild("quoteId");
+		String rate = tree.getFirstTextChild("interestRate");
+		String errorCode = tree.getFirstTextChild("errorCode");
+		String ssn = tree.getFirstTextChild("customerUID");
+		String email = tree.getFirstTextChild("customerEmail");
+		_logger.debug("info using for email: " + quoteID +" "+rate+" "+errorCode+" "+ssn+" "+email);
+		//_logger.debug("email address found: " + email);
+		
+		
+		
+		_logger.debug("preparing to send the quote response via email to customer");
+		ProcessEmail procEmail = new ProcessEmail(email, quoteID, rate, errorCode, ssn);
+		procEmail.sendEmail();
+		
+		
+		
+		return message;
+	}
+
+}

Added: labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/actions/CreditAgencyActions.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/actions/CreditAgencyActions.java	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/actions/CreditAgencyActions.java	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,73 @@
+package org.jboss.soa.esb.samples.trailblazer.actions;
+
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated 
+ * by the @authors tag. All rights reserved. 
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors. 
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A 
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * MA  02110-1301, USA.
+ * 
+ * (C) 2005-2006,
+ * @daniel.brum at jboss.com
+ */
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.util.Util;
+
+public class CreditAgencyActions {
+	protected Message 		_message;
+	protected ConfigTree	_config;
+	
+	private static Logger _logger = Logger.getLogger(CreditAgencyActions.class);
+	
+	public CreditAgencyActions(ConfigTree config) { _config = config; }
+	
+	public Message noOperation(Message message) { return message; }
+	
+	public Message processCreditRequest(Message message) throws Exception{
+		
+		_message = message;
+//		Message replyMessage=null;
+		
+		_logger.debug("message received: " + Util.serialize(message) );		
+		
+		//TODO: do smooks transformation on the CSV received
+		String csvData = new String(message.getBody().getContents());
+		_logger.debug("csv data received: " + csvData);
+		
+		//TODO: return a score
+//		replyMessage = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
+//		replyMessage.getBody().setContents("TEST REPLY".getBytes());
+//		EPR replyEPR = message.getHeader().getCall().getReplyTo();
+//		CourierFactory.getCourier(replyEPR).deliver(message);       
+		
+		return message;
+	}
+	
+	public Message debugMessage(Message message) throws Exception{
+		
+		_message = message;
+		_logger.debug("message received in processCreditRequest with message: " + Util.serialize(message));
+//		ActionUtils.getTaskObject(message);
+//		System.out.println("CreditAgencyActions.debugMessage(): in the action chain message: " + Util.serialize(message));
+		
+//		JMSEpr replyTo = new JMSEpr(message.getHeader().getCall().getReplyTo());
+//		CourierFactory.getCourier(replyTo).deliver(message);
+		
+		
+		return message;
+	}
+
+}

Added: labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/util/HsqldbUtil.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/util/HsqldbUtil.java	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/util/HsqldbUtil.java	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,69 @@
+package org.jboss.soa.esb.samples.trailblazer.util;
+
+import java.sql.DriverManager;
+import java.sql.Statement;
+
+import org.apache.log4j.Logger;
+import org.hsqldb.Server;
+/**
+ * Utility to start and stop a hsql Database.
+ * 
+ * @author <a href="mailto:kurt.stam at jboss.com">Kurt Stam</a>
+ *
+ */
+public class HsqldbUtil 
+{
+	final private static String THREAD_NAME = "hypersonic-unittest";
+	
+	private static Logger _logger = Logger.getLogger(HsqldbUtil.class);
+	/**
+	 * Starts the hsql database in it's own thread. 
+	 * Don't forget to shut it down when you're done.
+	 * 
+	 * @param databaseFile - i.e. build/hsqltestdb
+	 * @param databaseName - i.e. jbossesb
+	 * @throws Exception
+	 */
+	public static void startHsqldb(final String databaseFile,
+			final String databaseName) throws Exception 
+	{
+		// Start DB in new thread, or else it will block us
+		Thread serverThread = new Thread(THREAD_NAME) {
+			public void run() {
+				try {
+					// Create startup arguments
+					String[] args = new String[4];
+					args[0] = "-database.0";
+					args[1] = databaseFile;
+					args[2] = "-dbname.0";
+					args[3] = databaseName;
+					
+					_logger.info("creating db from this script: " + databaseFile);
+
+					// Start server
+					Server.main(args);
+				} catch (Exception e) {
+					e.printStackTrace();
+				}
+//				log.error("Failed to start database", e);
+			}
+		};
+		serverThread.run();
+	}
+	/**
+	 * 
+	 * @param url
+	 * @param username
+	 * @param password
+	 * @throws Exception
+	 */
+	public static void stopHsqldb(String url, String username, String password) throws Exception {
+		java.sql.Connection connection = DriverManager.getConnection(
+				url, username, password);
+		Statement statement = connection.createStatement();
+		String shutdownCommand = "SHUTDOWN COMPACT";
+		statement.executeQuery(shutdownCommand);
+	}
+
+	
+}

Added: labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/util/Launcher.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/util/Launcher.java	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/util/Launcher.java	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,168 @@
+package org.jboss.soa.esb.samples.trailblazer.util;
+
+import java.io.File;
+import java.sql.Connection;
+import java.sql.Statement;
+
+import org.apache.log4j.Logger;
+import org.apache.log4j.xml.DOMConfigurator;
+import org.jboss.internal.soa.esb.persistence.format.db.DBConnectionManager;
+import org.jboss.soa.esb.common.Configuration;
+import org.jboss.soa.esb.listeners.gateway.GatewayListenerController;
+import org.jboss.soa.esb.listeners.message.EsbListenerController;
+import org.jboss.soa.esb.listeners.message.EsbListenerControllerFactory;
+import org.jboss.soa.esb.testutils.HsqldbUtil;
+import org.jboss.soa.esb.testutils.TestEnvironmentUtil;
+
+
+public class Launcher {	
+	
+	private EsbListenerController	_esbListController;
+	private GatewayListenerController _gatewayController;
+	
+	
+	private Logger _logger = Logger.getLogger(Launcher.class);
+	
+	public static void main (String args[]) throws Exception 
+	{
+//		System.setProperty("com.arjuna.common.util.propertyservice.verbosePropertyManager", "ON");
+		System.setProperty("org.jboss.soa.esb.propertyFile", "jbossesb-properties.xml");	
+		
+		//Adding the to make it easy to run in eclipse
+		String arg0=null, arg1=null, arg2=null;
+		String baseDir="";
+		if (args.length==0) {
+			arg0 = "60";
+			if (TestEnvironmentUtil.getUserDir("trailblazer2").equals("trailblazer2/")) {
+				baseDir = "product/samples/trailblazer2/";				
+			}
+			arg1 = baseDir + "esb/conf/jbossesb-listener.xml";
+			arg2 = baseDir + "esb/conf/jbossesb-gateway.xml";
+			System.out.println("Setting default arguments:" + arg0 + " " + arg1 + " " + arg2);
+		}
+		//eclipse peace out
+		if (args.length > 1) {
+			arg0 = args[0];
+			arg1 = args[1];
+		}
+		
+		for (int x=0; x<args.length; x++)
+			System.out.println("arg[" + x + "]=" + args[x]);
+		
+		
+		Launcher launcher = new Launcher();
+		if(args.length > 2) {
+			System.out.println("calling triggerListener with 3 arguments...");
+			launcher.triggerListener(Long.valueOf(arg0).longValue(), arg1, args[2]);
+		}else
+			launcher.triggerListener(Long.valueOf(arg0).longValue(), arg1, null);
+	
+	}
+	
+	private void triggerListener(long runTime, String messageAwareConfigFile, String gatewayConfigFile) throws Exception{
+		try 
+        {
+			//setupRegistry();
+			runBeforeAllTests();
+			
+			
+    		if (null != messageAwareConfigFile) {
+    			_logger.info("starting message aware listener with config file - " + messageAwareConfigFile);
+    			_esbListController = EsbListenerControllerFactory.getInstance(messageAwareConfigFile);
+    		}
+    		
+    		if (null != gatewayConfigFile) {
+    			_logger.info("starting gateway listener with config file - " + gatewayConfigFile);
+    			_gatewayController = new GatewayListenerController(gatewayConfigFile);
+    			new Thread(_gatewayController).start();
+    			Thread.sleep(4000);
+    		}
+
+    		//Only shutdown the ESB services if specified
+    		if (runTime > 0) {
+	    		_logger.info("going to sleep now for " + runTime + " seconds...");    		
+	    		Thread.sleep(runTime*1000);
+	    		if (null != messageAwareConfigFile) {
+	    			_logger.info("shutting down message aware listener...");
+	    			_esbListController.requestEnd();
+	    		}
+	    		
+	    		if (null != gatewayConfigFile) {
+	    			_logger.info("shutting down gateway listener...");
+	    			_gatewayController.requestEnd();
+	    		}
+    		}
+    		    	
+        }
+        catch (Exception e) { 
+        	_logger.error(e);
+        	e.printStackTrace();
+        	throw(e);
+        }
+        finally { 
+        	Launcher.runAfterAllTests(); 
+        	}
+	
+
+	}
+	
+protected static void runBeforeAllTests() throws Exception{	
+	//System.setProperty("com.arjuna.common.util.propertyservice.verbosePropertyManager", "on");
+	String baseDir="";
+	String productDir = "../../";
+	if (TestEnvironmentUtil.getUserDir("trailblazer2").equals("trailblazer2/")) {
+		baseDir = "product/samples/trailblazer2/";
+		productDir = "product/";
+	}
+	DOMConfigurator.configure(baseDir + "log4j.xml");
+	String driver = Configuration.getStoreDriver();
+	System.out.println("Driver=" + driver);
+	if ("org.hsqldb.jdbcDriver".equals(driver)) {
+		
+		//start hsqldb
+		HsqldbUtil.startHsqldb(productDir + "build/hsqldb", "jbossesb");
+		String database = "hsqldb";	
+		
+		//message store db
+		String sqlDir = productDir + "install/message-store/sql/" + database + "/";
+		String sqlCreateCmd    = TestEnvironmentUtil.readTextFile(new File(sqlDir + "create_database.sql"));
+		String sqlDropCmd      = TestEnvironmentUtil.readTextFile(new File(sqlDir + "drop_database.sql"));		
+		
+		DBConnectionManager mgr = DBConnectionManager.getInstance();
+		Connection con = mgr.getConnection();
+		
+		Statement stmnt = con.createStatement();
+		System.out.println("Dropping the message store schema if exists...");
+		stmnt.execute(sqlDropCmd);
+		System.out.println("Creating the message store schema...");
+		stmnt.execute(sqlCreateCmd);
+		
+		//registry DB
+		sqlDir = productDir + "install/jUDDI-registry/sql/" + database + "/";
+		System.out.println("Dropping the registry schema if exists...");
+		sqlDropCmd      = TestEnvironmentUtil.readTextFile(new File(sqlDir + "drop_database.sql"));
+		stmnt.execute(sqlDropCmd);
+		System.out.println("creating the registry schema...");
+		sqlCreateCmd    = TestEnvironmentUtil.readTextFile(new File(sqlDir + "create_database.sql"));
+		stmnt.execute(sqlCreateCmd);
+		System.out.println("inserting registry publishers...");
+		String sqlInsertPubCmd = TestEnvironmentUtil.readTextFile(new File(sqlDir + "insert_publishers.sql"));
+		stmnt.execute(sqlInsertPubCmd);
+		stmnt.close();
+		con.close();
+	}
+		
+	}
+	
+	private static void runAfterAllTests() throws Exception{
+		
+		//shutdown message store if using hsqldb
+		if (Configuration.getStoreDriver().equals("org.hsqldb.jdbcDriver")) {
+			HsqldbUtil.stopHsqldb(Configuration.getStoreUrl(),
+					Configuration.getStoreUser(),Configuration.getStorePwd() );
+			}
+	}
+	
+	
+
+}

Added: labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/util/ProcessEmail.java
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/util/ProcessEmail.java	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/esb/src/org/jboss/soa/esb/samples/trailblazer/util/ProcessEmail.java	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,103 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+
+package org.jboss.soa.esb.samples.trailblazer.util;
+
+import org.antlr.stringtemplate.StringTemplate;
+import org.antlr.stringtemplate.StringTemplateGroup;
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.common.Configuration;
+import org.jboss.soa.esb.common.ModulePropertyManager;
+import org.jboss.soa.esb.helpers.Email;
+
+
+public class ProcessEmail {
+	
+	private Logger logger = Logger.getLogger(this.getClass());	
+	private String emailTo, quoteID, rate, code, ssn;
+
+
+	public ProcessEmail(String email, String quoteID, String rate, String code, String ssn) {
+		this.emailTo=email;
+		this.quoteID=quoteID;
+		this.rate=rate;
+		this.code=code;
+		this.ssn=ssn;
+		logger.debug("creating email helper");
+						
+	}
+	
+	public void sendEmail() {		
+		try {
+			if (null==emailTo) {
+				logger.error("no email found for customer, aborting send");
+				return;
+			}
+			logger.info("customer SSN " + ssn + " - sending email to: " + emailTo);
+			Email emailMessage = new Email();			
+			emailMessage.setSendTo(emailTo);
+			emailMessage.setSubject("TrailBlazer Quote from Bank");
+			String emailFrom = Configuration.getSmtpFrom();
+			emailMessage.setFrom(emailFrom);
+//			File emailTemplate = new File(LoanBrokerConstants.EMAIL_TEMPLATE);
+//			String quoteMsg=FileUtil.readTextFile(emailTemplate);
+			emailMessage.setMessage(fillTemplate());
+			emailMessage.sendMessage();			
+		}catch (Exception e) {			
+			logger.error("error sending email - " + e);	
+			e.printStackTrace();		
+		}		
+	}
+	
+	private String fillTemplate() throws Exception{
+		//load up the email templates from the StringTemplate files
+		System.setProperty("com.arjuna.common.util.propertyservice.verbosePropertyManager", "ON");
+		String templatePath = ModulePropertyManager.getPropertyManager("trailblazer").
+			getProperty("org.jboss.soa.esb.trailblazer.email.template.path");
+		String templateFile = ModulePropertyManager.getPropertyManager("trailblazer").
+			getProperty("org.jboss.soa.esb.trailblazer.email.template.file");
+		                 
+		logger.debug("loading StringTemplate from path: "+templatePath);
+		logger.debug("loading StringTemplate from file: "+templateFile);
+		
+		StringTemplateGroup group =  new StringTemplateGroup("loan", templatePath);
+		StringTemplate email = group.getInstanceOf(templateFile);
+		
+		//String email, String quoteID, String rate, String code, String ssn
+		email.setAttribute("quote", quoteID);
+		email.setAttribute("rate", rate);
+		email.setAttribute("ssn", ssn);
+		email.setAttribute("code", code);
+		email.setAttribute("email", emailTo);
+		
+		return email.toString();
+		
+	}
+	
+	public static void main(String[] args) {
+		ProcessEmail email = new ProcessEmail("dbrum101 at gmail.com", "111", ".65", "0", "123456");
+		email.sendEmail();
+		
+	}
+
+}

Added: labs/jbossesb/trunk/product/samples/trailblazer/esb-quickstart-service.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/esb-quickstart-service.xml	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/esb-quickstart-service.xml	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+<mbean code="org.jboss.mq.server.jmx.Queue"
+	 name="jboss.mq.destination:service=Queue,name=E">
+  <depends optional-attribute-name="DestinationManager">
+  	jboss.mq:service=DestinationManager
+  </depends>
+</mbean>
+
+</server>

Added: labs/jbossesb/trunk/product/samples/trailblazer/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/jbossesb-properties.xml	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/jbossesb-properties.xml	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  JBoss, Home of Professional Open Source
+  Copyright 2006, JBoss Inc., and others contributors as indicated 
+  by the @authors tag. All rights reserved. 
+  See the copyright.txt in the distribution for a
+  full listing of individual contributors. 
+  This copyrighted material is made available to anyone wishing to use,
+  modify, copy, or redistribute it subject to the terms and conditions
+  of the GNU Lesser General Public License, v. 2.1.
+  This program is distributed in the hope that it will be useful, but WITHOUT A 
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+  PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+  You should have received a copy of the GNU Lesser General Public License,
+  v.2.1 along with this distribution; if not, write to the Free Software
+  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+  MA  02110-1301, USA.
+  
+  (C) 2005-2006,
+  @author JBoss Inc.
+-->
+<!-- $Id: default-jbossesb-properties.xml $ -->
+<!--
+  These options are described in the JBossESB manual.
+  Defaults are provided here for convenience only.
+ 
+  Please read through this file prior to using the system, and consider
+  updating the specified entries.
+-->
+<esb
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:noNamespaceSchemaLocation="jbossesb-1_0.xsd">
+    <properties name="core">
+		<property name="org.jboss.soa.esb.jndi.server.type" 			value="jboss"/>
+		<property name="org.jboss.soa.esb.jndi.server.url" 			value="localhost"/>
+		<property name="org.jboss.soa.esb.persistence.connection.factory" 	value="org.jboss.internal.soa.esb.persistence.format.MessageStoreFactoryImpl"/>
+    </properties>
+    <properties name="registry">
+    	<property name="org.jboss.soa.esb.registry.queryManagerURI" value="org.apache.juddi.registry.local.InquiryService#inquire"/>
+    	<property name="org.jboss.soa.esb.registry.lifeCycleManagerURI" value="org.apache.juddi.registry.local.PublishService#publish"/>
+    	<property name="org.jboss.soa.esb.registry.implementationClass" value="org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl"/>
+    	<property name="org.jboss.soa.esb.registry.factoryClass" value="org.apache.ws.scout.registry.ConnectionFactoryImpl"/>
+    	<property name="org.jboss.soa.esb.registry.user" value="jbossesb"/>
+    	<property name="org.jboss.soa.esb.registry.password" value="password"/>
+    	<!-- the following parameter is scout specific to set the type of communication between scout and the UDDI (embedded, rmi, soap) -->
+    	<property name="org.jboss.soa.esb.scout.proxy.transportClass" value="org.apache.ws.scout.transport.LocalTransport"/>
+    </properties>
+    <properties name="transports" depends="core">
+    	<property name="org.jboss.soa.esb.mail.smtp.host" value="mail.osserver.net"/>
+    	<property name="org.jboss.soa.esb.mail.smtp.user" value="kstam"/>
+    	<property name="org.jboss.soa.esb.mail.smtp.from" value="kurt.stam at jboss.com"/>
+    	<property name="org.jboss.soa.esb.mail.smtp.password" value=""/>
+    	<property name="org.jboss.soa.esb.mail.smtp.port" value="25"/>
+	    <!-- if your mail server requires this - most do now a days -->
+	<property name="org.jboss.soa.esb.mail.smtp.auth" value="false"/>
+
+    </properties>
+    <properties name="connection">
+    	<property name="min-pool-size" value="5"/>
+    	<property name="max-pool=size" value="10"/>
+    	<property name="blocking-timeout-millis" value="5000"/>
+    	<property name="abandoned-connection-timeout" value="10000"/>
+    	<property name="abandoned-connection-time-interval" value="30000"/>
+    </properties>
+    <properties name="dbstore">
+		<property name="org.jboss.soa.esb.persistence.messagestore.factory" 	value="org.jboss.internal.soa.esb.persistence.format.MessageStoreFactoryImpl"/>
+		<property name="org.jboss.soa.esb.persistence.db.connection.url" 	value="jdbc:hsqldb:hsql://localhost:9001/jbossesb"/>
+		<property name="org.jboss.soa.esb.persistence.db.jdbc.driver" 		value="org.hsqldb.jdbcDriver"/>
+		<property name="org.jboss.soa.esb.persistence.db.user" 			value="sa"/>
+		<property name="org.jboss.soa.esb.persistence.db.pwd" 			value=""/>		
+		<property name="org.jboss.soa.esb.persistence.db.pool.initial.size"	value="2"/>
+		<property name="org.jboss.soa.esb.persistence.db.pool.min.size"	value="2"/>
+		<property name="org.jboss.soa.esb.persistence.db.pool.max.size"	value="5"/>
+		<!--table managed by pool to test for valid connections - created by pool automatically -->
+		<property name="org.jboss.soa.esb.persistence.db.pool.test.table"	value="pooltest"/>
+		<!-- # of milliseconds to timeout waiting for a connection from pool -->
+		<property name="org.jboss.soa.esb.persistence.db.pool.timeout.millis"	value="5000"/> 
+    </properties>
+    <properties name="messagerouting">
+    	<property name="org.jboss.soa.esb.routing.cbrClass" value="org.jboss.internal.soa.esb.services.routing.cbr.JBossRulesRouter"/>
+    </properties>
+    <!-- this section added for the convenience of the trailblazer only -->
+    <properties name="trailblazer">
+		<property name="org.jboss.soa.esb.trailblazer.request.service.epr.name" value="creditagency"/>
+		<property name="org.jboss.soa.esb.trailblazer.request.service.category" value="trailblazer"/>
+		<property name="org.jboss.soa.esb.trailblazer.jmsbank.queue" value="queue/C"/>
+		<property name="org.jboss.soa.esb.trailblazer.email.template.path" value="template"/>
+		<property name="org.jboss.soa.esb.trailblazer.email.template.file" value="quote"/>		
+    </properties>
+</esb>

Added: labs/jbossesb/trunk/product/samples/trailblazer/juddi.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/juddi.properties	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/juddi.properties	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,70 @@
+# jUDDI Registry Properties (used by RegistryServer)
+# see http://www.juddi.org for more information
+
+# The UDDI Operator Name
+juddi.operatorName = jUDDI.org
+
+# The i18n locale default codes
+juddi.i18n.languageCode = en
+juddi.i18n.countryCode = US
+
+# The UDDI DiscoveryURL Prefix
+juddi.discoveryURL = http://localhost:8080/juddi/uddiget.jsp?
+
+# The UDDI Operator Contact Email Address
+juddi.operatorEmailAddress = admin at juddi.org
+
+# The maximum name size and maximum number
+# of name elements allows in several of the
+# FindXxxx and SaveXxxx UDDI functions.
+juddi.maxNameLength=255
+juddi.maxNameElementsAllowed=5
+
+# The maximum number of UDDI artifacts allowed
+# per publisher. A value of '-1' indicates any 
+# number of artifacts is valid (These values can be
+# overridden at the individual publisher level).
+juddi.maxBusinessesPerPublisher=25
+juddi.maxServicesPerBusiness=20
+juddi.maxBindingsPerService=10
+juddi.maxTModelsPerPublisher=100
+
+# jUDDI Authentication module to use
+juddi.auth = org.apache.juddi.auth.DefaultAuthenticator
+
+# jUDDI DataStore module currently to use
+juddi.dataStore = org.apache.juddi.datastore.jdbc.JDBCDataStore
+
+# use a dataSource (if set to false a direct 
+# jdbc connection will be used.
+juddi.isUseDataSource=false
+juddi.jdbcDriver=org.hsqldb.jdbcDriver
+#juddi.jdbcUrl=jdbc:hsqldb:hsql://localhost/jbossesb
+juddi.jdbcUrl=jdbc:hsqldb:hsql://localhost:9001/jbossesb
+juddi.jdbcUsername=sa
+juddi.jdbcPassword=
+# jUDDI DataSource to use
+juddi.dataSource=java:comp/env/jdbc/juddiDB
+
+# jUDDI UUIDGen implementation to use
+juddi.uuidgen = org.apache.juddi.uuidgen.DefaultUUIDGen
+
+# jUDDI Cryptor implementation to use
+juddi.cryptor = org.apache.juddi.cryptor.DefaultCryptor
+ 
+# jUDDI Validator to use
+juddi.validator=org.apache.juddi.validator.DefaultValidator
+
+# jUDDI Proxy Properties (used by RegistryProxy)
+juddi.proxy.adminURL = http://localhost:8080/juddi/admin
+juddi.proxy.inquiryURL = http://localhost:8080/juddi/inquiry
+juddi.proxy.publishURL = http://localhost:8080/juddi/publish
+juddi.proxy.transportClass = org.apache.juddi.proxy.AxisTransport
+juddi.proxy.securityProvider = com.sun.net.ssl.internal.ssl.Provider
+juddi.proxy.protocolHandler = com.sun.net.ssl.internal.www.protocol
+
+# JNDI settings (used by RMITransport)
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+  

Added: labs/jbossesb/trunk/product/samples/trailblazer/log4j.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/log4j.xml	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/log4j.xml	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,300 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  Log4j Configuration                                                  -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+<!-- $Id: log4j.xml,v 1.26.2.10 2006/04/21 17:29:20 csuconic Exp $ -->
+
+<!--
+   | For more configuration infromation and examples see the Jakarta Log4j
+   | owebsite: http://jakarta.apache.org/log4j
+ -->
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+   <!-- ================================= -->
+   <!-- Preserve messages in a local file -->
+   <!-- ================================= -->
+
+   <!-- A time/date based rolling appender -->
+   <appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender">
+      <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+      <param name="File" value="./trailblazer.log"/>
+      <param name="Append" value="false"/>
+
+      <!-- Rollover at midnight each day -->
+      <param name="DatePattern" value="'.'yyyy-MM-dd"/>
+
+      <!-- Rollover at the top of each hour
+      <param name="DatePattern" value="'.'yyyy-MM-dd-HH"/>
+      -->
+
+      <layout class="org.apache.log4j.PatternLayout">
+         <!-- The default pattern: Date Priority [Category] Message\n -->
+         <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
+
+         <!-- The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n
+         <param name="ConversionPattern" value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
+          -->
+      </layout>
+   </appender>
+
+   <!-- A size based file rolling appender
+   <appender name="FILE" class="org.jboss.logging.appender.RollingFileAppender">
+     <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+     <param name="File" value="${jboss.server.log.dir}/server.log"/>
+     <param name="Append" value="false"/>
+     <param name="MaxFileSize" value="500KB"/>
+     <param name="MaxBackupIndex" value="1"/>
+
+     <layout class="org.apache.log4j.PatternLayout">
+       <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
+     </layout>	    
+   </appender>
+   -->
+
+   <!-- ============================== -->
+   <!-- Append messages to the console -->
+   <!-- ============================== -->
+
+   <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+      <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+      <param name="Target" value="System.out"/>
+      <param name="Threshold" value="INFO"/>
+
+      <layout class="org.apache.log4j.PatternLayout">
+         <!-- The default pattern: Date Priority [Category] Message\n -->
+         <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
+      </layout>
+   </appender>
+
+   <!-- ====================== -->
+   <!-- More Appender examples -->
+   <!-- ====================== -->
+
+   <!-- Buffer events and log them asynchronously
+   <appender name="ASYNC" class="org.apache.log4j.AsyncAppender">
+     <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+     <appender-ref ref="FILE"/>
+     <appender-ref ref="CONSOLE"/>
+     <appender-ref ref="SMTP"/>
+   </appender>
+   -->
+
+   <!-- EMail events to an administrator
+   <appender name="SMTP" class="org.apache.log4j.net.SMTPAppender">
+     <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+     <param name="Threshold" value="ERROR"/>
+     <param name="To" value="admin at myhost.domain.com"/>
+     <param name="From" value="nobody at myhost.domain.com"/>
+     <param name="Subject" value="JBoss Sever Errors"/>
+     <param name="SMTPHost" value="localhost"/>
+     <param name="BufferSize" value="10"/>
+     <layout class="org.apache.log4j.PatternLayout">
+       <param name="ConversionPattern" value="[%d{ABSOLUTE},%c{1}] %m%n"/>
+     </layout>
+   </appender>
+   -->
+
+   <!-- Syslog events
+   <appender name="SYSLOG" class="org.apache.log4j.net.SyslogAppender">
+     <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+     <param name="Facility" value="LOCAL7"/>
+     <param name="FacilityPrinting" value="true"/>
+     <param name="SyslogHost" value="localhost"/>
+     <layout class="org.apache.log4j.PatternLayout">
+       <param name="ConversionPattern" value="[%d{ABSOLUTE},%c{1}] %m%n"/>
+     </layout>
+   </appender>
+   -->
+
+   <!-- Log events to JMS (requires a topic to be created)
+   <appender name="JMS" class="org.apache.log4j.net.JMSAppender">
+     <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+     <param name="Threshold" value="ERROR"/>
+     <param name="TopicConnectionFactoryBindingName" value="java:/ConnectionFactory"/>
+     <param name="TopicBindingName" value="topic/MyErrorsTopic"/>
+   </appender>
+   -->
+
+   <!-- Log events through SNMP
+   <appender name="TRAP_LOG" class="org.apache.log4j.ext.SNMPTrapAppender">
+     <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+     <param name="ImplementationClassName" value="org.apache.log4j.ext.JoeSNMPTrapSender"/>
+     <param name="ManagementHost" value="127.0.0.1"/>
+     <param name="ManagementHostTrapListenPort" value="162"/>
+     <param name="EnterpriseOID" value="1.3.6.1.4.1.24.0"/>
+     <param name="LocalIPAddress" value="127.0.0.1"/>
+     <param name="LocalTrapSendPort" value="161"/>
+     <param name="GenericTrapType" value="6"/>
+     <param name="SpecificTrapType" value="12345678"/>
+     <param name="CommunityString" value="public"/>
+     <param name="ForwardStackTraceWithTrap" value="true"/>
+     <param name="Threshold" value="DEBUG"/>
+     <param name="ApplicationTrapOID" value="1.3.6.1.4.1.24.12.10.22.64"/>
+     <layout class="org.apache.log4j.PatternLayout">
+            <param name="ConversionPattern" value="%d,%p,[%t],[%c],%m%n"/>
+     </layout>
+   </appender>
+   -->
+
+   <!--  Emit events as JMX notifications
+   <appender name="JMX" class="org.jboss.monitor.services.JMXNotificationAppender">
+      <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+      
+      <param name="Threshold" value="WARN"/>
+      <param name="ObjectName" value="jboss.system:service=Logging,type=JMXNotificationAppender"/>
+      
+      <layout class="org.apache.log4j.PatternLayout">
+         <param name="ConversionPattern" value="%d %-5p [%c] %m"/>
+      </layout>
+   </appender>
+   -->
+   
+   <!-- ================ -->
+   <!-- Limit categories -->
+   <!-- ================ -->
+
+   <!-- Limit the org.apache category to INFO as its DEBUG is verbose -->
+   <category name="org.apache">
+      <priority value="INFO"/>
+   </category>
+
+   <!-- Limit the org.jboss.serial (jboss-serialization) to INFO as its DEBUG is verbose -->
+   <category name="org.jboss.serial">
+      <priority value="INFO"/>
+   </category>
+
+   <!-- Limit the org.jgroups category to WARN as its INFO is verbose -->
+   <category name="org.jgroups">
+      <priority value="WARN"/>
+   </category>
+
+   <!-- Limit the jacorb category to WARN as its INFO is verbose -->
+   <category name="jacorb">
+      <priority value="WARN"/>
+   </category>
+
+   <!-- Limit JBoss categories
+   <category name="org.jboss">
+      <priority value="INFO"/>
+   </category>
+   -->
+
+   <!-- Limit the JSR77 categories -->
+   <category name="org.jboss.management">
+      <priority value="INFO"/>
+   </category>
+
+   <!-- Limit Axis based webservice category -->
+   <category name="org.jboss.webservice">
+      <priority value="DEBUG"/>
+   </category>
+   <category name="org.jboss.axis">
+      <priority value="INFO"/>
+   </category>
+
+   <!-- Limit JBossWS webservice category
+   <category name="org.jboss.ws">
+      <priority value="DEBUG"/>
+   </category>
+   -->
+
+   <!-- Decrease the priority threshold for the org.jboss.varia category
+   <category name="org.jboss.varia">
+     <priority value="DEBUG"/>
+   </category>
+   -->
+
+   <!-- Show the evolution of the DataSource pool in the logs [inUse/Available/Max]
+   <category name="org.jboss.resource.connectionmanager.JBossManagedConnectionPool">
+     <priority value="TRACE" class="org.jboss.logging.XLevel"/>
+   </category>
+   -->
+
+   <!--
+      | An example of enabling the custom TRACE level priority that is used
+      | by the JBoss internals to diagnose low level details. This example
+      | turns on TRACE level msgs for the org.jboss.ejb.plugins package and its
+      | subpackages. This will produce A LOT of logging output.
+   <category name="org.jboss.system">
+     <priority value="TRACE" class="org.jboss.logging.XLevel"/>
+   </category>
+   <category name="org.jboss.ejb.plugins">
+     <priority value="TRACE" class="org.jboss.logging.XLevel"/>
+   </category>
+   -->
+  
+   <!--
+       | Logs these events to SNMP:
+           - server starts/stops
+           - cluster evolution (node death/startup)
+           - When an EJB archive is deployed (and associated verified messages)
+           - When an EAR archive is deployed
+      	 
+   <category name="org.jboss.system.server.Server">
+     <priority value="INFO" />
+     <appender-ref ref="TRAP_LOG"/>
+   </category>
+  
+   <category name="org.jboss.ha.framework.interfaces.HAPartition.lifecycle">
+     <priority value="INFO" />
+     <appender-ref ref="TRAP_LOG"/>
+   </category>
+
+   <category name="org.jboss.deployment.MainDeployer">
+     <priority value="ERROR" />
+     <appender-ref ref="TRAP_LOG"/>
+   </category>
+   
+   <category name="org.jboss.ejb.EJBDeployer">
+     <priority value="INFO" />
+     <appender-ref ref="TRAP_LOG"/>
+   </category>
+   
+   <category name="org.jboss.deployment.EARDeployer">
+     <priority value="INFO" />
+     <appender-ref ref="TRAP_LOG"/>
+   </category>
+  
+   -->
+
+   <!-- ======================= -->
+   <!-- Setup the Root category -->
+   <!-- ======================= -->
+
+   <root>
+      <appender-ref ref="CONSOLE"/>
+      <appender-ref ref="FILE"/>
+   </root>
+
+   <!-- Clustering logging -->
+   <!-- Uncomment the following to redirect the org.jgroups and
+      org.jboss.ha categories to a cluster.log file.
+
+   <appender name="CLUSTER" class="org.jboss.logging.appender.RollingFileAppender">
+     <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+     <param name="File" value="${jboss.server.log.dir}/cluster.log"/>
+     <param name="Append" value="false"/>
+     <param name="MaxFileSize" value="500KB"/>
+     <param name="MaxBackupIndex" value="1"/>
+
+     <layout class="org.apache.log4j.PatternLayout">
+       <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
+     </layout>
+   </appender>
+   <category name="org.jgroups">
+     <priority value="DEBUG" />
+     <appender-ref ref="CLUSTER"/>
+   </category>
+   <category name="org.jboss.ha">
+     <priority value="DEBUG" />
+     <appender-ref ref="CLUSTER"/>
+   </category>
+   -->
+
+</log4j:configuration>

Added: labs/jbossesb/trunk/product/samples/trailblazer/readme.txt
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/readme.txt	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/readme.txt	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,32 @@
+The trailblazer is a small application that uses several of the services provided by the JBoss ESB.
+
+Required to run the Trailblazer:
+- ANT
+- A mail server to send email notifications
+- JBoss AS 4.0.4 or higher with EJB3 and JBossWS support.  You can install the latest JBoss AS JEMS installer and select the "EJB3" install config to get the right one installed.
+
+Settings required to edit before running:
+
+File: jbossesb-properties.xml
+- Update the section titled "transports" and specify all of the SMTP mail server settings for your environment.
+- you can change the settings in the "trailblazer" to work on different queues, etc but you can leave all of these as is for the default settings.
+
+File: build.properties
+- update with the 2 settings below to where you have your JBoss deployed to, along with the server instance you are using:
+org.jboss.soa.samples.trailblazer.jboss_home=/opt/jboss-4.0.5
+org.jboss.soa.samples.trailblazer.jboss_server=default
+
+
+-------------------------------------------
+To run the Trailblazer, follow these steps:
+
+1 - run your JBoss AS - you will need to have the 4.0.4 or higher with the EJB3 support installed.  This is rquired because the TB uses the JSR-181 pojo style web service.
+
+2 - from the TB_ROOT, execute the command to start the ESB: ANT deploy-war runESB
+* this should deploy the WAR to your JBoss AS server/default and deploy the Web Service/JSP page.
+
+3 - from the TB_ROOT/banks execute the command to start the Bank service: ANT runJMSBank
+
+4 - from the jsp: localhost:8080/trailblazer
+
+That's it.  Now you can submit quotes, and you should receive an email at the specified address on the page.

Added: labs/jbossesb/trunk/product/samples/trailblazer/template/quote.st
===================================================================
--- labs/jbossesb/trunk/product/samples/trailblazer/template/quote.st	2006-12-12 17:48:07 UTC (rev 8262)
+++ labs/jbossesb/trunk/product/samples/trailblazer/template/quote.st	2006-12-12 17:51:58 UTC (rev 8263)
@@ -0,0 +1,20 @@
+JBossESB - TrailBlazer Quote Response Notification
+
+Customer SSN:           $ssn$
+Customer Email:         $email$
+
+-- BANK QUOTES RECEIVED --
+
+QUOTE ID:	$quote$
+RATE:		$rate$
+BANK CODE:	$code$
+
+-- BANK CODES --
+0 - success
+1 - loan term exceeds the maximum available loan term
+2 - invalid SSN
+3 - invalid credit score
+4 - invalid credit history length
+5 - invalid loan term
+6 - invalid message
+7 - invalid customer ID




More information about the jboss-svn-commits mailing list