<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesource.org/schema/mule/core/2.0"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:spring="http://www.springframework.org/schema/beans"
       xsi:schemaLocation="
       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
       http://www.mulesource.org/schema/mule/core/2.0 http://www.mulesource.org/schema/mule/core/2.0/mule.xsd">

    <model name="main">
        <service name="orange1">
            <component class="org.mule.tck.testmodels.fruit.Orange"/>
        </service>

        <service name="orange2">
            <pooled-component>
                <prototype-object class="org.mule.tck.testmodels.fruit.Orange">
                    <property key="brand" value="Florida Sunny"/>
                    <property key="segments" value="8"/>
                    <property key="radius" value="15"/>
                </prototype-object>
            </pooled-component>
        </service>

        <service name="orange3">
            <component>
                <singleton-object class="org.mule.tck.testmodels.fruit.Orange"/>
            </component>
        </service>

        <service name="orange4">
            <component>
                <spring-object bean="myOnlyOrange"/>
            </component>
        </service>
        
        <service name="orange5">
            <component>
                <spring-object bean="myOrangeFactory"/>
            </component>
        </service>

        <service name="orange6">
            <component>
                <spring-object bean="myNonStandardOrangeFactory"/>
            </component>
        </service>
    </model>

    <!-- Singleton instance -->
    <spring:bean name="myOnlyOrange" class="org.mule.tck.testmodels.fruit.Orange"/>

    <!-- Spring FactoryBean implementation -->
    <spring:bean id="myOrangeFactory" class="org.mule.tck.testmodels.fruit.FloridaSunnyOrangeFactoryBean">
        <spring:property name="segments" value="8"/>
        <spring:property name="radius" value="15"/>
    </spring:bean>

    <!-- POJO used as FactoryBean -->
    <spring:bean id="myNonStandardOrangeFactory" 
                 class="org.mule.tck.testmodels.fruit.FloridaSunnyOrangeFactory" 
                 factory-method="giveMeAnOrange"/>

</mule>
