<?xml version="1.0" encoding="utf-8" ?>

<!-- Spring Manged Objects -->
<objects xmlns="http://www.springframework.net"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:db="http://www.springframework.net/database"
         xsi:schemaLocation="http://www.springframework.net http://www.springframework.net/xsd/spring-objects.xsd" >

  <object id="deploymentVars" type="Sleis.Utility.PropertyUtility, Sleis">
    <property name="location">
      <value>file://~/Config/Deployment.config</value>
    </property>
  </object>
 
  <!--DB Session Factory/NHibernate Injection-->
  <db:provider id="DbProvider"
              provider="${data.provider}"
              connectionString="${data.connection}"/>

  <object id="AdoTemplate" type="Spring.Data.Core.AdoTemplate, Spring.Data">
    <property name="DbProvider" ref="DbProvider"/>
  </object>
  
  <object id="NHibernateSessionFactory" type="Sleis.Infrastructure.SessionFactoryProvider">
    <property name="DbProvider" ref="DbProvider"/>
    <property name="HibernateProperties">
      <dictionary>
        <entry key="connection.provider" value="NHibernate.Connection.DriverConnectionProvider"/>
        <entry key="dialect" value="${hibernate.dialect}"/>
        <entry key="connection.driver_class" value="${hibernate.connection.driver_class}"/>
        <entry key="proxyfactory.factory_class" value="NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle"/>
        <entry key="show_sql" value="true"/>
        <entry key="current_session_context_class" value="Spring.Data.NHibernate.SpringSessionContext, Spring.Data.NHibernate31"/>
      </dictionary>
    </property>

    <property name="ExposeTransactionAwareSessionFactory" value="false" />
  </object>
 

  <!-- Imports -->
  <import resource="file://~/Config/Template.config" />
  <import resource="file://~/Config/Utility.config" />
  <import resource="file://~/Config/Data.config" />
  <import resource="file://~/Config/Service.config" />
  <import resource="file://~/Config/Controller.config" />
  <import resource="file://~/Config/Mail.config" />
  <import resource="file://~/Config/Validation.config" />
  <import resource="file://~/Config/Pdf.config" />
  <import resource="file://~/Config/Schedule.config" />
  <import resource="file://~/Config/Export.config" />

</objects>