ples.mule-example-loanbroker.1.3.2.source-code.loan-broker-async-javaspaces-config.xml Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mule-example-loanbroker Show documentation
Show all versions of mule-example-loanbroker Show documentation
The Loan Broker example application is based on the example presented in the Enterprise Integration Patterns book. This chapter of the book is available online so you can see a detailed description of the application here (http://www.eaipatterns.com/ComposedMessagingWS.html).
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mule-configuration PUBLIC "-//MuleSource //DTD mule-configuration XML V1.0//EN" "http://mule.mulesource.org/dtds/mule-configuration.dtd"> <mule-configuration id="Mule_Loan_Broker_Asynchronous_Sample" version="1.0"> <description> This loan broker example is modeled on the Enterprise integration Patterns book sample. This implementation differs in that this configuration uses an asynchronous model where each component communicates messaging accordin to it's configuration in this file. </description> <mule-environment-properties serverUrl="" enableMessageEvents="true" > <threading-profile maxBufferSize="0" maxThreadsActive="5" maxThreadsIdle="5" poolExhaustedAction="RUN" threadTTL="3000000"/> <pooling-profile maxActive="5" maxIdle="5" exhaustedAction="GROW" maxWait="1000"/> <queue-profile maxOutstandingMessages="200"/> </mule-environment-properties> <container-context className="org.mule.impl.container.PropertiesContainerContext"> <properties> <map name="systemProperties"> <property name="com.gs.home" value="/java/mule-1.2/samples/space"/> <property name="com.gs.security.enabled" value="false"/> <property name="java.security.policy" value="${com.gs.home}/policy/policy.all"/> </map> </properties> </container-context> <!-- <agents>--> <!-- starts an RMI registry on the default port 1099 for JMX Remoting and then sets up all the default Jmx support agents in Mule --> <!-- <agent name="JMX" className="org.mule.management.agents.DefaultJmxSupportAgent"/>--> <!-- </agents>--> <!-- for some reason Axis auto typing doesn't always work and you need to define the top-level bean types for the objects you're passing around --> <connector name="axisConnector" className="org.mule.providers.soap.axis.AxisConnector"> <properties> <list name="beanTypes"> <entry value="org.mule.samples.loanbroker.Customer"/> <entry value="org.mule.samples.loanbroker.BankQuoteRequest"/> <entry value="org.mule.samples.loanbroker.Bank"/> </list> </properties> </connector> <!-- Setting global endpoints can help simplify configuration by defining an actual url endpointUri in one place. The endpointUri name can be used in place of the url. --> <endpoint-identifiers> <!--<endpoint-identifier name="LoanBrokerRequests" value="vm://LoanBrokerRequests"/>--> <!--<endpoint-identifier name="LoanBrokerQuotes" value="vm://LoanBrokerQuotes"/>--> <endpoint-identifier name="CreditAgency" value="axis:http://localhost:18080/mule/CreditAgencyService?method=getCreditProfile"/> <endpoint-identifier name="CreditAgencyReceiver" value="axis:http://localhost:18080/mule"/> <endpoint-identifier name="LenderService" value="vm://localhost/LenderService"/> <endpoint-identifier name="Bank1" value="axis:http://localhost:10080/mule"/> <endpoint-identifier name="Bank2" value="axis:http://localhost:20080/mule"/> <endpoint-identifier name="Bank3" value="axis:http://localhost:30080/mule"/> <endpoint-identifier name="Bank4" value="axis:http://localhost:40080/mule"/> <endpoint-identifier name="Bank5" value="axis:http://localhost:50080/mule"/> </endpoint-identifiers> <global-endpoints> <endpoint name="LoanBrokerRequests" address="gs:java://localhost/mule-space_container/mule-space?schema=cache"> <filter className="org.mule.providers.gs.filters.PojoTypeTemplateFilter" expectedType="org.mule.samples.loanbroker.LoanRequest"> </filter> </endpoint> <endpoint name="LoanBrokerQuotes" address="gs:java://localhost/mule-space_container/mule-space?schema=cache"> <filter className="org.mule.providers.gs.filters.PojoTypeTemplateFilter" expectedType="org.mule.samples.loanbroker.LoanQuote"> </filter> </endpoint> </global-endpoints> <!-- The Mule model initialises and manages your UMO components --> <model name="loan-broker"> <mule-descriptor name="LoanRequestToSpace" implementation="org.mule.components.simple.BridgeComponent"> <inbound-router> <endpoint address="vm://LoanBrokerRequests"/> </inbound-router> <outbound-router> <router className="org.mule.routing.outbound.OutboundPassThroughRouter"> <endpoint address="gs:java://localhost/mule-space_container/mule-space?schema=cache"/> </router> </outbound-router> </mule-descriptor> <!-- by declaring the Axis service component we can overload its default configuration to add more threads or pooled resources --> <!--<mule-descriptor name="_axisServiceComponent"--> <!--implementation="org.mule.providers.soap.axis.AxisServiceComponent">--> <!--<pooling-profile exhaustedAction="WAIT" maxActive="20" maxIdle="20" maxWait="20000"/>--> <!--</mule-descriptor>--> <!-- The loan broker is used to receive loan requests --> <mule-descriptor name="LoanBroker" implementation="org.mule.samples.loanbroker.AsyncLoanBroker"> <!-- This router uses the BankQuoteAggregator for events of type BankQuote, for all other types the catch all strategy is invoked, which simply passes the event to the component --> <inbound-router> <catch-all-strategy className="org.mule.routing.ComponentCatchAllStrategy"/> <global-endpoint name="LoanBrokerRequests"/> <global-endpoint name="LoanBrokerQuotes"/> <router className="org.mule.samples.loanbroker.routers.BankQuotesAggregator"> <filter expectedType="org.mule.samples.loanbroker.LoanQuote" className="org.mule.routing.filters.PayloadTypeFilter"/> </router> </inbound-router> <outbound-router> <router className="org.mule.routing.outbound.OutboundPassThroughRouter"> <endpoint address="CreditAgency"/> </router> </outbound-router> </mule-descriptor> <!-- The credit agency service will get the credit profile for a customer --> <mule-descriptor name="CreditAgencyService" implementation="org.mule.samples.loanbroker.DefaultCreditAgencyService"> <inbound-router> <endpoint address="CreditAgencyReceiver"/> </inbound-router> <outbound-router> <router className="org.mule.routing.outbound.OutboundPassThroughRouter"> <endpoint address="LenderService"/> </router> </outbound-router> </mule-descriptor> <!-- The Lender service is used to determine which banks to contact for a quote --> <mule-descriptor name="LenderService" implementation="org.mule.samples.loanbroker.DefaultLenderService"> <inbound-router> <endpoint address="LenderService"/> </inbound-router> <!-- this router will send an outbound event to none or more recipients which are set as a property on the event itelf. A replyTo property is also set which tells the recipients of the event where to send the resulting event --> <outbound-router> <catch-all-strategy className="org.mule.routing.LoggingCatchAllStrategy"/> <router className="org.mule.routing.outbound.StaticRecipientList"> <reply-to address="LoanBrokerQuotes"/> </router> </outbound-router> </mule-descriptor> <!-- These are mock bank services that represent remote bank loan services One or more of these are selected by the LenderService and a request is routed to them. The lenderService outbound router also defines a replyTo property which will be used by Mule to route the responses back to the LoanBrokerQuotes destination --> <mule-descriptor name="Bank1" implementation="org.mule.samples.loanbroker.Bank"> <inbound-router> <endpoint address="Bank1"/> </inbound-router> </mule-descriptor> <mule-descriptor name="Bank2" implementation="org.mule.samples.loanbroker.Bank"> <inbound-router> <endpoint address="Bank2"/> </inbound-router> </mule-descriptor> <mule-descriptor name="Bank3" implementation="org.mule.samples.loanbroker.Bank"> <inbound-router> <endpoint address="Bank3"/> </inbound-router> </mule-descriptor> <mule-descriptor name="Bank4" implementation="org.mule.samples.loanbroker.Bank"> <inbound-router> <endpoint address="Bank4"/> </inbound-router> </mule-descriptor> <mule-descriptor name="Bank5" implementation="org.mule.samples.loanbroker.Bank"> <inbound-router> <endpoint address="Bank5"/> </inbound-router> </mule-descriptor> </model> </mule-configuration>