<?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="SqlServer-1.1" 
                   connectionString="Data Source=(local);Database=Spring;User ID=springqa;Password=springqa;Trusted_Connection=False"/>
-->

  <object id="DbProvider" type="Spring.Data.Common.UserCredentialsDbProvider, Spring.Data">
    <property name="TargetDbProvider" ref="targetDbProvider"/>
    <property name="Username" value="User ID=defaultName"/>
    <property name="Password" value="Password=defaultPass"/>
  </object>

  <db:provider id="targetDbProvider" 
               provider="SqlServer-2.0"
               connectionString="Data Source=MARKT60\SQL2005;Trusted_Connection=False"/>


  <db:provider id="standardDbProvider"
             provider="SqlServer-2.0"
             connectionString="Data Source=MARKT60\SQL2005;Trusted_Connection=False;User ID=springqa;Password=springqa"/>



  <object id="SessionFactory" type="Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate20">
        <property name="DbProvider" ref="DbProvider"/>
        <property name="MappingResources">
          <list>
            <value>assembly://Spring.Data.NHibernate20.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>
            <!-- use connection provided by DbProvider 
             <entry key="hibernate.connection.provider"
                       value="NHibernate.Connection.DriverConnectionProvider"/>
            -->
             <entry key="dialect"
                    value="NHibernate.Dialect.MsSql2000Dialect"/>
                     
              <entry key="connection.driver_class"
                     value="NHibernate.Driver.SqlClientDriver"/>

             <!--
             <entry key="hibernate.dialect"
                    value="NHibernate.Dialect.Oracle9Dialect"/>
             -->             
            </dictionary>
        </property>
                      
    </object>

  <!--
    <object id="nativeNHTestObjectDao" type="Spring.Data.NHibernate.NativeNHTestObjectDao, Spring.Data.NHibernate.Integration.Tests">
        <property name="SessionFactory" ref="SessionFactory"/>
    </object>
        
    <object id="NHTestObjectDao" type="Spring.Data.NHibernate.NHTestObjectDao, Spring.Data.NHibernate.Integration.Tests">
        <property name="SessionFactory" ref="SessionFactory"/>
    </object>
    -->
    
    <object id="hibernateTransactionManager" 
            type="Spring.Data.NHibernate.HibernateTransactionManager, Spring.Data.NHibernate20">
            
        <property name="DbProvider" ref="DbProvider"/>
        <property name="sessionFactory" ref="SessionFactory"/>

    </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.NHibernate20.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>