Skip to content

Commit

Permalink
INT-1457 Add loan shark to loan broker readme
Browse files Browse the repository at this point in the history
  • Loading branch information
garyrussell committed Sep 16, 2010
1 parent 394efd2 commit 2ae518c
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
24 changes: 24 additions & 0 deletions spring-integration-samples/loan-broker/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,27 @@ Maven (command line):
Eclipse/STS (with m2eclipse plug-in)
1. Import project into Eclipse/STS. If the m2eclipse plugin is installed, the dependencies will be downloaded automatically.
2. Run the 'org.springframework.integration.loanbroker.demo.LoanBrokerDemo' class located in 'src/test/java'.


Loan Shark Extension
====================

This extension to the loan broker sample shows how to exchange messages between Spring Integration
applications (and other technologies) using UDP.

Any loan quotes over 5.2% will be sent to the loanshark application.

Deploy the loanshark sample in a web container (e.g. mvn tomcat:run); or run the perl (udps.pl)
or groovy (udps.groovy) scripts from the command line.

Run the LoanBrokerSharkDetectorDemo test case.

You can see the banks that were detected as loan sharks in the loanshark web UI.

If you use multicast (the default), messages will be received by the Roo UI war, the perl script,
and the groovy script. If not using multicast, only one of the receivers can be used.

To change from multicast to unicast, change the udpOut adapter in shark-detector-config.xml to set
'host' to "localhost" and multicast to "false". Refer to the ReadMe in loanshark to change it
from multicast to unicast for either the Roo application or the groovy script.

6 changes: 5 additions & 1 deletion spring-integration-samples/loanshark/README.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
To change the multicast code in udps.groovy to rely on unicast instead, simply
change the MulticastSocket type to DatagramSocket and remove the next 2 lines
that deal with joining the multicast group. Then, in the configuration of the
actual adapter, set: host="127.0.0.1" and multicast="false".
actual adapter, set: host="127.0.0.1" and multicast="false".

For the Roo/Spring Integration application, edit the integrationContext.xml
file, on the udpIn adapter, set multicast to false and remove the
multicast-address attribute.

0 comments on commit 2ae518c

Please sign in to comment.