<?xml version="1.0" encoding="utf-8" ?>
<configuration>

  <configSections>
    <sectionGroup name="spring">
      <section name="context" type="Spring.Context.Support.ContextHandler, Spring.Core" />
      <section name="objects" type="Spring.Context.Support.DefaultSectionHandler, Spring.Core" />
      <section name="parsers" type="Spring.Context.Support.NamespaceParsersSectionHandler, Spring.Core" />
    </sectionGroup>
  </configSections>

  <spring>

    <parsers>
      <parser type="Spring.Remoting.Config.RemotingNamespaceParser, Spring.Services" />
    </parsers>

    <context>
      <resource uri="config://spring/objects" />
      <resource uri="assembly://Spring.Calculator.RemoteApp/Spring.Calculator.RemoteApp.Config/cao.xml" />
      <resource uri="assembly://Spring.Calculator.RemoteApp/Spring.Calculator.RemoteApp.Config/cao-aop.xml" />
      <resource uri="assembly://Spring.Calculator.RemoteApp/Spring.Calculator.RemoteApp.Config/saoSingleCall.xml" />
      <resource uri="assembly://Spring.Calculator.RemoteApp/Spring.Calculator.RemoteApp.Config/saoSingleCall-aop.xml" />
      <resource uri="assembly://Spring.Calculator.RemoteApp/Spring.Calculator.RemoteApp.Config/saoSingleton.xml" />
      <resource uri="assembly://Spring.Calculator.RemoteApp/Spring.Calculator.RemoteApp.Config/saoSingleton-aop.xml" />
    </context>

    <objects xmlns="http://www.springframework.net"
				     xmlns:r="http://www.springframework.net/remoting">
      <description>Definitions of objects to be exported.</description>

      <r:configurer filename="Spring.Calculator.RemoteApp.exe.config" />

      <!--
				Old fashion way without remoting config parser...
			<object type="Spring.Remoting.RemotingConfigurer, Spring.Services">
				<property name="Filename" value="Spring.Calculator.RemoteApp.exe.config" />
			</object>
			-->

      <!-- Aspect -->

      <object id="ConsoleLoggingAroundAdvice" type="Spring.Aspects.Logging.ConsoleLoggingAroundAdvice, Spring.Aspects">
        <property name="ForegroundColor" value="Red" />
      </object>

      <!-- Singleton -->

      <object id="singletonCalculator" type="Spring.Calculator.Services.AdvancedCalculator, Spring.Calculator.Services">
        <constructor-arg type="int" value="217" />
      </object>

      <object id="singletonCalculatorWeaved" type="Spring.Aop.Framework.ProxyFactoryObject, Spring.Aop">
        <property name="target" ref="singletonCalculator" />
        <property name="interceptorNames">
          <list>
            <value>ConsoleLoggingAroundAdvice</value>
          </list>
        </property>
      </object>

      <!-- Prototype -->

      <object id="prototypeCalculator" type="Spring.Calculator.Services.AdvancedCalculator, Spring.Calculator.Services" singleton="false">
        <constructor-arg type="int" value="217" />
      </object>

      <object id="prototypeCalculatorWeaved" type="Spring.Aop.Framework.ProxyFactoryObject, Spring.Aop">
        <property name="targetSource">
          <object type="Spring.Aop.Target.PrototypeTargetSource, Spring.Aop">
            <property name="TargetObjectName" value="prototypeCalculator" />
          </object>
        </property>
        <property name="interceptorNames">
          <list>
            <value>ConsoleLoggingAroundAdvice</value>
          </list>
        </property>
      </object>

    </objects>

  </spring>

  <system.runtime.remoting>
    <application>
      <channels>
        <channel ref="tcp" port="8005" />
      </channels>
    </application>
  </system.runtime.remoting>

</configuration>