From 89d72264d0af4c65c9bf0b7a6f823f13d69162aa Mon Sep 17 00:00:00 2001 From: lresende Date: Wed, 11 Nov 2009 23:07:53 +0000 Subject: Moving 1.x branches git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@835127 13f79535-47bb-0310-9956-ffa450edef68 --- .../demos/mortgage-loanapproval/README | 60 ++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 sca-java-1.x/branches/sca-java-1.3/demos/mortgage-loanapproval/README (limited to 'sca-java-1.x/branches/sca-java-1.3/demos/mortgage-loanapproval/README') diff --git a/sca-java-1.x/branches/sca-java-1.3/demos/mortgage-loanapproval/README b/sca-java-1.x/branches/sca-java-1.3/demos/mortgage-loanapproval/README new file mode 100644 index 0000000000..dbf3829a20 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.3/demos/mortgage-loanapproval/README @@ -0,0 +1,60 @@ +Mortgage Loan Approval Demo +=========================== + +This demo was used as an example in the java developer journal article: http://jdj.sys-con.com/read/325183.htm. + +The demo consists of two modules: + +mortgage-loanapproval: provides the business logic for loan approval. +mortgage-creditcheck: handles credit check requests. This is a java component exposed as a webservice running on the embedded Tomcat. + +Please check mortgage_assembly.png file that is located in this directory for a high level view of the demo. + +Here is what happens when you run the demo. A loan approval request for customer with id 111-222-3333 +gets initiated when mortgage-loanapproval application is run. Depending on what the 'imaginary' credit + status of this person is, the loan gets approved or diapproved. + +You would need two command windows to run mortgage loan approval composite. The order in which the +applications are run is important. Run mortgage-creditcheck first since mortgage-loanapproval is dependent on +it's service. + +In the first command window +--------------------------- +1) go to mortgage-creditcheck directory +2) ant compile +3) ant run +You should see the following displayed: +Buildfile: build.xml + +run: + [java] Starting the CreditCheck Service... + [java] 14-Jan-2008 14:14:20 org.apache.tuscany.sca.http.jetty.JettyServer a +ddServletMapping + [java] INFO: Added Servlet mapping: http://L3AW203:8085/CreditCheckServiceC +omponent + [java] Press Enter to Exit... + +In the second command window +---------------------------- +1) go to mortgage-loanapproval directory +2) ant compile +3) ant run + +If the loan is approved, you will see the following displayed in the command screen where +mortgage-loanapproval is run: + +Buildfile: build.xml +run: + [java] Interest rate for a 30-year loan of $200000.0 in CA: 6.5% + [java] Approved: John Smith[111-22-3333] + +If the loan is disapproved, you will see the following displayed in the command screen where +mortgage-loanapproval is run: + +Buildfile: build.xml +run: + [java] Credit score for 111-22-3333: 708 + [java] Interest rate for a 30-year loan of $200000.0 in CA: 6.5% + [java] Debt/Income ratio 0.2528272093971861 is too high. + [java] Rejected: John Smith[111-22-3333] + -- cgit v1.2.3