[overlord-commits] Overlord SVN: r236 - in cdl/trunk/samples/jbossesb: broker/src/main/java/org/jboss/soa/overlord/samples/jbossesb/loan/broker and 1 other directory.

overlord-commits at lists.jboss.org overlord-commits at lists.jboss.org
Wed Aug 13 03:17:08 EDT 2008


Author: jeff.yuchang
Date: 2008-08-13 03:17:08 -0400 (Wed, 13 Aug 2008)
New Revision: 236

Modified:
   cdl/trunk/samples/jbossesb/README.txt
   cdl/trunk/samples/jbossesb/broker/src/main/java/org/jboss/soa/overlord/samples/jbossesb/loan/broker/SetCreditCheckRequestMessageAction.java
Log:
* Update document.


Modified: cdl/trunk/samples/jbossesb/README.txt
===================================================================
--- cdl/trunk/samples/jbossesb/README.txt	2008-08-13 03:27:18 UTC (rev 235)
+++ cdl/trunk/samples/jbossesb/README.txt	2008-08-13 07:17:08 UTC (rev 236)
@@ -8,13 +8,13 @@
 - JBoss AS 4.2.2.GA or higher with the JBoss ESB SAR deployment (jbossesb.sar).
 - JBossESB 4.3.GA 
 
-Folder directories:
+Folders structure:
 -------------------
-- client 
-- broker 
-- purchasing 
-- creditAgency
-- supplier
+- client: It is for running examples' client. 
+- broker: Broker participant. (Broker Example)
+- purchasing: Purchasing participant. (Purchase Example) 
+- creditAgency: CredityAgency participant. (For both Broker and Purchase Example)
+- supplier: supplier participant. (For Broker example)
 
 Settings required to edit before running:
 ========================================
@@ -25,7 +25,6 @@
 - Before jbossesb-rosetta.jar and jbossesb-config-model.jar get published in jboss maven repository, you need to install these two artifacts into 
 your local repository by using following commands:
 
-
 mvn install:install-file -Dfile=<path-to-rosetta> -DgroupId=org.jboss.jbossesb 
     -DartifactId=rosetta -Dversion=4.3 -Dpackaging=jar 
 mvn install:install-file -Dfile=<path-to-configmodel> -DgroupId=org.jboss.jbossesb
@@ -34,20 +33,22 @@
 Notice: Here we are using jbossesb-rosetta 4.3 version, jbossesb-config-model 1.0.1 version.
 
 
-Instructions for purchasing example:
-===========================================
-To run the purchasing, follow these steps:
+Instructions for deploying the cdl-jbossesb.esb to the JBoss ESB server.
+==========================================
+1. At the $cdl/trunk: run: mvn install.
+2. Copy the 'cdl-jbossesb.esb' from the 'assembly/jbossesb/target' to JBoss ESB server deploy folder.
 
-1 - run your JBoss AS - you will need to have the 4.2.2 or higher (with JBossESB installed)
 
-2 - from the $JBossAS, execute the command to start the ESB: "bin/run.sh", or "bin/run.bat" for windows.
+Instructions for deploying samples:
+==========================================
+1. Please make sure you are setting the 'deploy.dir' in $samples/pom.xml properly.
+2. At the $cdl/trunk/samples, run: mvn install, it will deploy the 'purchasing.esb', 'broker.esb', 'creditAgency.esb', 'supplier.esb' to the server deploy folder.
+3. From the $JBossAS, execute the command to start the ESB server: "bin/run.sh", or "bin/run.bat" for windows.
 
-3 - from the $purchasing: execute the command to start the Hsql database: "ant startdb".
+Instructions for running purchasing example:
+===========================================
 
-4 - Open up another shell, from the $Purchasing, execute the command to deploy the "Purchasing": "mvn install"
- * this should deploy the ESB archive to your JBoss AS server/default.
-
-5 - from the $client, execute the command to run the client: "ant runClient"
+1 - from the $samples/jbossesb/client, execute the command to run the client: "ant runClient"
     You will see following in the console.
 
      [java] =========================================
@@ -56,25 +57,10 @@
      [java] =========================================
 
 
-6 - you can be from the $purchasing to run "ant dbmanager" to open up the database browser to check the data.
-
-
-Instructions for broker example:
+Instructions for running broker example:
 =======================================
-To run the broker, follow these steps:
 
-Currently, if you want to run the 'broker' example, please open up the 'jbossesb-properties.xml' in the $JBossAS/server/default/deploy/jbossesb.sar, update the 'org.jboss.soa.esb.jms.connectionPool' property value to '30', instead of '20'. It won't be needed to update this if we separate the Supplier & Credit Agency as another two esb artifacts.
-
-1 - run your JBoss AS - you will need to have the 4.2.2 or higher (with JBossESB installed)
-
-2 - from the $JBossAS, execute the command to start the ESB: "bin/run.sh", or "bin/run.bat" for windows.
-
-3 - from the $broker: execute the command to start the Hsql database: "ant startdb".
-
-4 - Open up another shell, from the $broker, execute the command to deploy the "broker": "mvn install"
- * this should deploy the ESB archive to your JBoss AS server/default.
-
-5 - from the $client, execute the command to run the client: "ant runBrokerClient"
+1 - from the $samples/jbossesb/client, execute the command to run the client: "ant runBrokerClient"
     You will see following in the console.
      [java] =========================================
      [java] Request: <enquiry id="20" ></enquiry>
@@ -84,6 +70,30 @@
      [java] Reply: <bookingReference id="20" supplierDesc = "{http://www.jboss.org/overlord/loanBroker}Supplier1">The quote of 10 has been confirmed.</bookingReference>
      [java] =========================================
 
+Example scenario description:
+===============================
+1 - Purchasing example:
+------------
+The flow for this example would be:
 
-6 - you can be from the $broker to run "ant dbmanager" to open up the database browser to check the data.
+    * Users send an 'buy' request to broker
+    * Broker send a 'credit check' request to the credit agency.
+    * If the credit agency returns a successful message, then the Broker will send a 'BuyResponse' to user.
+    * If the credit agency returns a failed message, then the Broker will send a 'BuyFail' to user.
 
+
+2 - Broker example:
+----------
+
+The flow for this example would be:
+
+    * Users send an 'enquiry' request to broker
+    * Broker sends the request to one or more suppliers concurrently
+    * When all of the quote responses have been received, or a timeout expires, the available information is returned to the user.
+    * User decides whether to:
+          o Cancel the transaction, or
+          o Send a 'buy' request to the broker
+    * If a 'buy' request is received by the broker, it will send a 'credit check' request to the credit agency
+    * If the credit agency returns a successful message, then the Broker sends a 'buy' request to the supplier selected by the User (in the 'buy' request), followed by a confirmation back to the User
+    * If the credit agency returns a failed message, then the Broker will inform the User
+

Modified: cdl/trunk/samples/jbossesb/broker/src/main/java/org/jboss/soa/overlord/samples/jbossesb/loan/broker/SetCreditCheckRequestMessageAction.java
===================================================================
--- cdl/trunk/samples/jbossesb/broker/src/main/java/org/jboss/soa/overlord/samples/jbossesb/loan/broker/SetCreditCheckRequestMessageAction.java	2008-08-13 03:27:18 UTC (rev 235)
+++ cdl/trunk/samples/jbossesb/broker/src/main/java/org/jboss/soa/overlord/samples/jbossesb/loan/broker/SetCreditCheckRequestMessageAction.java	2008-08-13 07:17:08 UTC (rev 236)
@@ -40,7 +40,7 @@
 		
 		Node node = XMLUtils.getNode((String)message.getBody().get());
 		String idValue = node.getAttributes().getNamedItem("id").getNodeValue();
-		message.getBody().add("<CreditInformation id=\"" + idValue +"\"></CreditInformation>");
+		message.getBody().add("<creditInformation id=\"" + idValue +"\"></creditInformation>");
 		
 		logger.info("Updated credit check request message: "+message.getBody().get());
 		




More information about the overlord-commits mailing list