[jboss-svn-commits] JBL Code SVN: r5362 - labs/jbossesb/trunk/product/docs/samples/trailblazer/bankloanbrokerdemo/banks
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Jul 31 12:44:37 EDT 2006
Author: kurt.stam at jboss.com
Date: 2006-07-31 12:44:37 -0400 (Mon, 31 Jul 2006)
New Revision: 5362
Added:
labs/jbossesb/trunk/product/docs/samples/trailblazer/bankloanbrokerdemo/banks/Readme.txt
Log:
Adding instructional readme
Added: labs/jbossesb/trunk/product/docs/samples/trailblazer/bankloanbrokerdemo/banks/Readme.txt
===================================================================
--- labs/jbossesb/trunk/product/docs/samples/trailblazer/bankloanbrokerdemo/banks/Readme.txt 2006-07-31 15:10:23 UTC (rev 5361)
+++ labs/jbossesb/trunk/product/docs/samples/trailblazer/bankloanbrokerdemo/banks/Readme.txt 2006-07-31 16:44:37 UTC (rev 5362)
@@ -0,0 +1,69 @@
+BANKS FOR THE LOANBROKER DEMO
+
+1.Introduction.
+As part of the Loan Broker Demo, the broker goes out to a few banks to obtain loan quotes.
+This folder contains two banks:
+
+1. a Flat File Based Bank, and
+2. a JMS Based bank.
+
+To make the demo a little more interesting we have the banks use two different protocols (flat file and JMS), and two
+different message formats (csv, xml). You can customize some of the configuration in the bank.properties file. Not that
+the banks use to log4j.xml in the current directory.
+
+2. Flat File Based Bank.
+
+2.1 Starting the bank
+The Flat File Based Bank uses the property 'file.monitored.directory' which by default is set to 'C:/Temp'.
+You can start this bank by typing:
+
+ant runFileBank
+
+2.2 Processing details
+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.
+
+2.3 Testing
+You can test whetheror not the bank is working by dropping a file in the monitored directory (C:\Temp).Let's say we
+use a file with name 'request.txt'. The file should be ASCII and can contain the following line:
+
+23456890,3,4,20000,5
+
+The file should get moved to the C:\Temp\processed directory, and in the C:\Temp\outgoing directory a reply file should
+appear with the name 'reply_to_request.txt'. It should contain the line:
+
+8.29,FileBasedBank-1,0
+
+which means the QuoteId=FileBasedBank-1, the interest=8.29 and the errorCode=0 (which means success). Check the logging for
+additional details.
+
+3. JMS Based Bank
+
+3.1 Staring the bank
+Before starting the bank you need to bring up your JMS provider. For the example this is the JBoss AS. We are using
+the default queues (A and B). The JMS bank uses the properties: jms.provider.url, jms.queue.in and jms.queue.out. By
+default these are set to 'localhost', 'queue/A' and 'queue/B'. So, by default, it assumes JBoss AS is running on the localhost.
+Next you can start the JMS Based bank by typing:
+
+ant runJMSBank
+
+3.2 Processing details
+The JMSManager 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 BankQuote 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.
+
+3.3 Testing
+The unit test JMSProcessorTest drops a BankQuoteRequest Message on the queue/A of localhost. You can use
+this test to check the health of the JMSBank. The tests can be executed by typing
+
+ant test
+
+4 Finally
+You are now ready to run the larger Load Broker Demo itself.
\ No newline at end of file
More information about the jboss-svn-commits
mailing list