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

<beans>

  <!-- Base Hibernate SessionFactory -->
  <bean id="org.sakaiproject.springframework.orm.hibernate.impl.AdditionalHibernateMappingsImpl.common"
    class="org.sakaiproject.springframework.orm.hibernate.impl.AdditionalHibernateMappingsImpl">

    <property name="mappingResources">
      <list>
        <value>
          org/sakaiproject/component/common/type/TypeImpl.hbm.xml
        </value>
        <value>
          org/sakaiproject/component/common/edu/person/SakaiPersonImpl.hbm.xml
        </value>
      </list>
    </property>

  </bean>

  <bean id="org.sakaiproject.api.common.type.TypeManager"
    class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
    <property name="transactionManager">
      <ref bean="org.sakaiproject.springframework.orm.hibernate.GlobalTransactionManager" />
    </property>
    <property name="target">
      <bean
        class="org.sakaiproject.component.common.type.TypeManagerImpl">
        <property name="sessionFactory">
          <ref bean="org.sakaiproject.springframework.orm.hibernate.GlobalSessionFactory" />
        </property>
        <property name="persistableHelper">
          <ref
            bean="org.sakaiproject.component.common.manager.PersistableHelper" />
        </property>
      </bean>
    </property>
    <property name="transactionAttributes">
      <props>
        <prop key="*">PROPAGATION_REQUIRED</prop>
      </props>
    </property>
  </bean>

  <bean id="org.sakaiproject.api.common.edu.person.SakaiPersonManager"
    class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
    <property name="transactionManager">
      <ref bean="org.sakaiproject.springframework.orm.hibernate.GlobalTransactionManager" />
    </property>
    <property name="target">
      <bean
        class="org.sakaiproject.component.common.edu.person.SakaiPersonManagerImpl"
        init-method="init">
        <property name="sessionFactory">
          <ref bean="org.sakaiproject.springframework.orm.hibernate.GlobalSessionFactory" />
        </property>
        <property name="typeManager">
          <ref bean="org.sakaiproject.api.common.type.TypeManager" />
        </property>
        <property name="persistableHelper">
          <ref
            bean="org.sakaiproject.component.common.manager.PersistableHelper" />
        </property>
      </bean>
    </property>
    <property name="transactionAttributes">
      <props>
        <prop key="*">PROPAGATION_REQUIRED</prop>
      </props>
    </property>
  </bean>

  <bean id="org.sakaiproject.component.common.manager.PersistableHelper"
    class="org.sakaiproject.component.common.manager.PersistableHelper">
    <property name="sessionManager">
      <ref bean="org.sakaiproject.tool.api.SessionManager" />
    </property>
  </bean>

</beans>
