All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ples.mule-example-loanbroker.1.3.2.source-code.loan-broker-xfire-async-config.xml Maven / Gradle / Ivy

Go to download

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).

There is a newer version: 1.3.3
Show newest version
<?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 according to its 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>

<!--    <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>-->

    <!--
    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="xfire:http://localhost:18080/mule/CreditAgencyService?method=getCreditProfile"/>
        <endpoint-identifier name="CreditAgencyReceiver" value="xfire:http://localhost:18080/mule"/>
        <endpoint-identifier name="LenderService" value="vm://localhost/LenderService"/>
        <endpoint-identifier name="Bank1" value="xfire:http://localhost:10080/mule"/>
        <endpoint-identifier name="Bank2" value="xfire:http://localhost:20080/mule"/>
        <endpoint-identifier name="Bank3" value="xfire:http://localhost:30080/mule"/>
        <endpoint-identifier name="Bank4" value="xfire:http://localhost:40080/mule"/>
        <endpoint-identifier name="Bank5" value="xfire:http://localhost:50080/mule"/>
    </endpoint-identifiers>

    <!--
       The Mule model initialises and manages your UMO components
   -->
    <model name="loan-broker">
        <!-- by declaring the Fire service component we can overload its default
        configuration to add more threads or pooled resources -->
        <mule-descriptor name="_xfireServiceComponent"
            implementation="org.mule.providers.soap.xfire.XFireServiceComponent">
            <threading-profile maxBufferSize="100" threadTTL="600000" maxThreadsActive="30" maxThreadsIdle="20"/>
            <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"
            outboundEndpoint="CreditAgency"
            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"/>
                <endpoint address="LoanBrokerRequests"/>
                <endpoint address="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>
            <!--            <queue-profile maxOutstandingMessages="150" blockWait="3000" />-->
            <!--            <pooling-profile maxActive="20" maxIdle="10" exhaustedAction="GROW" maxWait="10000" />-->
            <!--            <threading-profile maxBufferSize="100" maxThreadsActive="20" maxThreadsIdle="5" poolExhaustedAction="RUN" threadTTL="60000" />-->
        </mule-descriptor>

        <!--
        The credit agency service will get the credit profile for a customer
        -->
        <mule-descriptor name="CreditAgencyService"
            inboundEndpoint="CreditAgencyReceiver"
            outboundEndpoint="LenderService"
            implementation="org.mule.samples.loanbroker.DefaultCreditAgencyService">
        </mule-descriptor>

        <!--
        The Lender service is used to determine which banks to contact for a quote
        -->
        <mule-descriptor name="LenderService"
            inboundEndpoint="LenderService"
            implementation="org.mule.samples.loanbroker.DefaultLenderService">
            <!--
            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"
            inboundEndpoint="Bank1"
            implementation="org.mule.samples.loanbroker.Bank">
        </mule-descriptor>

        <mule-descriptor name="Bank2"
            inboundEndpoint="Bank2"
            implementation="org.mule.samples.loanbroker.Bank">
        </mule-descriptor>

        <mule-descriptor name="Bank3"
            inboundEndpoint="Bank3"
            implementation="org.mule.samples.loanbroker.Bank">
        </mule-descriptor>

        <mule-descriptor name="Bank4"
            inboundEndpoint="Bank4"
            implementation="org.mule.samples.loanbroker.Bank">
        </mule-descriptor>

        <mule-descriptor name="Bank5"
            inboundEndpoint="Bank5"
            implementation="org.mule.samples.loanbroker.Bank">
        </mule-descriptor>
    </model>
</mule-configuration>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy