<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
    "http://www.springframework.org/dtd/spring-beans.dtd">

<beans>
    <!-- Hibernate SessionFactory -->
    <bean id="sessionFactory" class="org.springframework.orm.hibernate.LocalSessionFactoryBean">
        <property name="dataSource"><ref bean="dataSource"/></property>
        <property name="mappingResources">
            <list>
				<value>cn/com/xunuo/model/Sysuser.hbm.xml</value>
				<value>cn/com/xunuo/model/Plate.hbm.xml</value>
				<value>cn/com/xunuo/model/Sysuserrole.hbm.xml</value>
				<value>cn/com/xunuo/model/Sysmodule.hbm.xml</value>
				<value>cn/com/xunuo/model/Article.hbm.xml</value>
				<value>cn/com/xunuo/model/Browser.hbm.xml</value>
				<value>cn/com/xunuo/model/Dealprocess.hbm.xml</value>
				<value>cn/com/xunuo/model/Infofeedback.hbm.xml</value>
				<value>cn/com/xunuo/model/Infofeedbacktype.hbm.xml</value>
				<value>cn/com/xunuo/model/Lead.hbm.xml</value>
				<value>cn/com/xunuo/model/Leadsort.hbm.xml</value>
				<value>cn/com/xunuo/model/Leavemessage.hbm.xml</value>
            </list>
        </property>
<!--
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</prop>
<prop key="hibernate.show_sql">false</prop>
 Create/update the database tables automatically when the JVM starts up
<prop key="hibernate.hbm2ddl.auto">update</prop> 
<prop key="hibernate.jdbc.batch_size">100</prop>
 </props>
 </property>
-->        
        <property name="hibernateProperties">
        <props><!-- net.sf.hibernate.dialect.MySQLDialect -->
		<!-- net.sf.hibernate.dialect.SQLServerDialect -->
            <prop key="hibernate.dialect">net.sf.hibernate.dialect.SQLServerDialect</prop>
<!-- old            <prop key="hibernate.show_sql">false</prop> -->
			<prop key="hibernate.show_sql">false</prop>
<!--            <prop key="hibernate.hbm2ddl.auto">update</prop>-->
			<prop key="hibernate.jdbc.batch_size">100</prop>
        </props>
        </property>
    </bean>

    <!-- Transaction manager for a single Hibernate SessionFactory (alternative to JTA) -->
    <bean id="transactionManager" class="org.springframework.orm.hibernate.HibernateTransactionManager">
        <property name="sessionFactory"><ref local="sessionFactory"/></property>
    </bean>

    <!-- Generic DAO - can be used when doing standard CRUD -->
    <bean id="dao" class="cn.com.xunuo.dao.hibernate.BaseDAOHibernate">
        <property name="sessionFactory"><ref local="sessionFactory"/></property>
    </bean>
	<!-- SysuserDAO: Hibernate implementation -->
    <bean id="sysuserDAO" class="cn.com.xunuo.dao.hibernate.SysuserDAOHibernate">
        <property name="sessionFactory"><ref local="sessionFactory"/></property>
    </bean>
	<!-- PlatesDAO: Hibernate implementation -->
    <bean id="plateDAO" class="cn.com.xunuo.dao.hibernate.PlateDAOHibernate">
        <property name="sessionFactory"><ref local="sessionFactory"/></property>
    </bean>
	<!-- ArticlesDAO: Hibernate implementation -->
    <bean id="articleDAO" class="cn.com.xunuo.dao.hibernate.ArticleDAOHibernate">
        <property name="sessionFactory"><ref local="sessionFactory"/></property>
    </bean>
	<!-- SysuserrolesDAO: Hibernate implementation -->
    <bean id="sysuserroleDAO" class="cn.com.xunuo.dao.hibernate.SysuserroleDAOHibernate">
        <property name="sessionFactory"><ref local="sessionFactory"/></property>
    </bean>
	<!-- SysmodulesDAO: Hibernate implementation -->
    <bean id="sysmoduleDAO" class="cn.com.xunuo.dao.hibernate.SysmoduleDAOHibernate">
        <property name="sessionFactory"><ref local="sessionFactory"/></property>
    </bean>
	<!-- BrowsersDAO: Hibernate implementation -->
    <bean id="browserDAO" class="cn.com.xunuo.dao.hibernate.BrowserDAOHibernate">
        <property name="sessionFactory"><ref local="sessionFactory"/></property>
    </bean>
	<!-- BrowsersDAO: Hibernate implementation -->
    <bean id="dealprocessDAO" class="cn.com.xunuo.dao.hibernate.DealprocessDAOHibernate">
        <property name="sessionFactory"><ref local="sessionFactory"/></property>
    </bean>
	<!-- BrowsersDAO: Hibernate implementation -->
    <bean id="infofeedbackDAO" class="cn.com.xunuo.dao.hibernate.InfofeedbackDAOHibernate">
        <property name="sessionFactory"><ref local="sessionFactory"/></property>
    </bean>
	<!-- BrowsersDAO: Hibernate implementation -->
    <bean id="infofeedbacktypeDAO" class="cn.com.xunuo.dao.hibernate.InfofeedbacktypeDAOHibernate">
        <property name="sessionFactory"><ref local="sessionFactory"/></property>
    </bean>
	<!-- BrowsersDAO: Hibernate implementation -->
    <bean id="leadDAO" class="cn.com.xunuo.dao.hibernate.LeadDAOHibernate">
        <property name="sessionFactory"><ref local="sessionFactory"/></property>
    </bean>
	<!-- BrowsersDAO: Hibernate implementation -->
    <bean id="leadsortDAO" class="cn.com.xunuo.dao.hibernate.LeadsortDAOHibernate">
        <property name="sessionFactory"><ref local="sessionFactory"/></property>
    </bean>
	<!-- BrowsersDAO: Hibernate implementation -->
    <bean id="leavemessageDAO" class="cn.com.xunuo.dao.hibernate.LeavemessageDAOHibernate">
        <property name="sessionFactory"><ref local="sessionFactory"/></property>
    </bean>
    <!-- Add new DAOs here -->

</beans>
