<?xml version="1.0" encoding="utf-8" ?>
<objects xmlns='http://www.springframework.net'
		 xmlns:db="http://www.springframework.net/database">


  <db:provider   id="DbProvider"
                 provider="System.Data.SqlClient"
                 connectionString="Data Source=(local);Database=Spring;User ID=springqa;Password=springqa;Trusted_Connection=False"/>
  <!--
                   connectionString="Data Source=MARKT60\SQL2005;Initial Catalog=Spring;User ID=springqa; Password=springqa"/>
                   -->
  <!--                   
    <db:provider id="DbProvider" 
                   provider="OracleODP-2.0" 
                   connectionString="Data Source=AGORA; User Id=agora_user; Password=welcome_bad"/>
   -->
  <!--
  <db:provider id="DbProvider"
             provider="System.Data.SqlClient"
             connectionString="Data Source=MARKT60\SQL2005;Initial Catalog=Spring;User ID=springqa; Password=springqa"/>
             -->

  <object id="SessionFactory" type="Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate5">
    <!-- TODO Provide dedicated NHibernate Schema -->
    <property name="DbProvider" ref="DbProvider"/>
    <property name="MappingResources">
      <list>
        <value>assembly://Spring.Data.NHibernate5.Integration.Tests/Spring.Data.NHibernate/TestObject.hbm.xml</value>
      </list>
    </property>
    <!--
        <property name="MappingAssemblies">
            <list>
                <value>Spring.Data.NHibernate.Integration.Tests</value>
            </list>
        </property>
        -->
    <property name="HibernateProperties">
      <dictionary>

        <!--
             <entry key="hibernate.connection.provider"
                       value="NHibernate.Connection.DriverConnectionProvider"/>

             <entry key="hibernate.dialect"
                    value="NHibernate.Dialect.Oracle9Dialect"/>
             -->


        <entry key="dialect"
               value="NHibernate.Dialect.MsSql2000Dialect"/>

        <entry key="connection.driver_class"
               value="NHibernate.Driver.SqlClientDriver"/>

        <!--
             <entry key="proxyfactory.factory_class"
                    value="NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu"/>
             -->


      </dictionary>
    </property>

  </object>

  <object id="nativeNHTestObjectDao" type="Spring.Data.NHibernate.NativeNHTestObjectDao, Spring.Data.NHibernate5.Integration.Tests">
    <property name="SessionFactory" ref="SessionFactory"/>
  </object>

  <object id="NHTestObjectDao" type="Spring.Data.NHibernate.NHTestObjectDao, Spring.Data.NHibernate5.Integration.Tests">
    <property name="SessionFactory" ref="SessionFactory"/>
  </object>

  <object id="hibernateTransactionManager"
          type="Spring.Data.NHibernate.HibernateTransactionManager, Spring.Data.NHibernate5">

    <property name="DbProvider" ref="DbProvider"/>
    <property name="sessionFactory" ref="SessionFactory"/>

  </object>

  <!-- Transactional Proxy for TestObjectDao using transaction attributes -->
  <object id="testObjectDaoViaTxAttributes"
          type="Spring.Transaction.Interceptor.TransactionProxyFactoryObject, Spring.Data">

    <property name="PlatformTransactionManager" ref="hibernateTransactionManager"/>
    <property name="Target">
      <object type="Spring.Data.NHibernate.NHTestObjectDao">
        <property name="SessionFactory" ref="SessionFactory"/>
      </object>
    </property>

    <property name="ProxyInterfaces" value="Spring.Data.NHibernate.ITestObjectDao"/>

    <property name="TransactionAttributeSource">
      <object type="Spring.Transaction.Interceptor.AttributesTransactionAttributeSource" />
    </property>
  </object>

  <!-- Transactional Proxy for TestObjectDao using the TransactionProxyFactory -->
  <object id="testObjectDaoTransProxy"
          type="Spring.Transaction.Interceptor.TransactionProxyFactoryObject, Spring.Data">

    <property name="PlatformTransactionManager" ref="hibernateTransactionManager"/>
    <property name="Target">
      <object type="Spring.Data.NHibernate.NHTestObjectDao, Spring.Data.NHibernate5.Integration.Tests">
        <property name="SessionFactory" ref="SessionFactory"/>
      </object>
    </property>

    <property name="ProxyInterfaces" value="Spring.Data.NHibernate.ITestObjectDao"/>

    <property name="TransactionAttributes">
      <name-values>
        <add key="Create*" value="PROPAGATION_REQUIRED"/>
        <add key="Delete*" value="PROPAGATION_REQUIRED"/>
        <add key="Update*" value="PROPAGATION_REQUIRED"/>
        <add key="Find*" value="PROPAGATION_REQUIRED"/>
      </name-values>
    </property>
  </object>

</objects>