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

<beans>
	
	<!-- Transaction template for Managers, from:
		 http://blog.exis.com/colin/archives/2004/07/31/concise-transaction-definitions-spring-11/ -->
    <bean id="txProxyTemplate" abstract="true"
        class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
        <property name="transactionManager"><ref bean="transactionManager"/></property>
        <property name="transactionAttributes">
            <props>
                <prop key="save*">PROPAGATION_REQUIRED</prop>
				<prop key="update*">PROPAGATION_REQUIRED</prop>
                <prop key="remove*">PROPAGATION_REQUIRED</prop>
				<prop key="view*">PROPAGATION_REQUIRED</prop>				
				<prop key="find*">PROPAGATION_REQUIRED</prop>	
				<prop key="up*">PROPAGATION_REQUIRED</prop>
				<prop key="down*">PROPAGATION_REQUIRED</prop>
                <prop key="get*">PROPAGATION_REQUIRED,readOnly</prop>
				<prop key="set*">PROPAGATION_REQUIRED</prop>
				<prop key="check*">PROPAGATION_REQUIRED</prop>
				<prop key="elite*">PROPAGATION_REQUIRED</prop>
				<prop key="black*">PROPAGATION_REQUIRED</prop>
				<prop key="has*">PROPAGATION_REQUIRED</prop>
				<prop key="top*">PROPAGATION_REQUIRED</prop>
				<prop key="move*">PROPAGATION_REQUIRED</prop>
				<prop key="vote*">PROPAGATION_REQUIRED</prop>
				<prop key="*">PROPAGATION_REQUIRED,readOnly</prop>
            </props>
        </property>
    </bean>

    <!-- Generic manager that can be used to do basic CRUD operations on any objects -->
    <bean id="manager" parent="txProxyTemplate">
        <property name="target">
            <bean class="cn.com.xunuo.service.impl.BaseManager">
                <property name="DAO"><ref bean="dao"/></property>
            </bean>
        </property>
    </bean>

	<bean id="systemManager" parent="txProxyTemplate">
        <property name="target">
            <bean class="cn.com.xunuo.service.impl.SystemManagerImpl">
                <property name="sysuserDAO"><ref bean="sysuserDAO"/></property>
				<property name="sysuserroleDAO"><ref bean="sysuserroleDAO"/></property>
				<property name="sysmoduleDAO"><ref bean="sysmoduleDAO"/></property>
				<property name="plateDAO"><ref bean="plateDAO"/></property>
            </bean>
        </property>
    </bean>
	<bean id="cmsManager" parent="txProxyTemplate">
        <property name="target">
            <bean class="cn.com.xunuo.service.impl.CmsManagerImpl">
				<property name="plateDAO"><ref bean="plateDAO"/></property>
				<property name="articleDAO"><ref bean="articleDAO"/></property>
				<property name="browserDAO"><ref bean="browserDAO"/></property>
            </bean>
        </property>
    </bean>
	<bean id="dealManager" parent="txProxyTemplate">
        <property name="target">
            <bean class="cn.com.xunuo.service.impl.DealManagerImpl">
				<property name="dealprocessDAO"><ref bean="dealprocessDAO"/></property>
				<property name="infofeedbackDAO"><ref bean="infofeedbackDAO"/></property>
				<property name="infofeedbacktypeDAO"><ref bean="infofeedbacktypeDAO"/></property>
				<property name="plateDAO"><ref bean="plateDAO"/></property>
            </bean>
        </property>
    </bean>
	<bean id="leadManager" parent="txProxyTemplate">
        <property name="target">
            <bean class="cn.com.xunuo.service.impl.LeadManagerImpl">
				<property name="leadDAO"><ref bean="leadDAO"/></property>
				<property name="leadsortDAO"><ref bean="leadsortDAO"/></property>
				<property name="leavemessageDAO"><ref bean="leavemessageDAO"/></property>
            </bean>
        </property>
    </bean>

</beans>