org.sakaiproject.poll.spring-hibernate.xml Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of polls-impl Show documentation
Show all versions of polls-impl Show documentation
This project provides the implementation used by the Sakai Poll Tool.
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> <!-- define the list of HBM mapping files --> <bean id="org.sakaiproject.poll.hbmMappingList" class="java.util.ArrayList"> <constructor-arg> <list> <value>org/sakaiproject/poll/hbm/Poll.hbm.xml</value> <value>org/sakaiproject/poll/hbm/Option.hbm.xml</value> <value>org/sakaiproject/poll/hbm/Vote.hbm.xml</value> </list> </constructor-arg> </bean> <!-- create a DAO bean, use the hibernate implementation --> <!-- create a DAO bean, use the hibernate implementation --> <bean id="org.sakaiproject.poll.dao.impl.PollDaoTarget" class="org.sakaiproject.poll.dao.impl.PollDoaImpl" init-method="init"> <property name="sessionFactory" ref="org.sakaiproject.springframework.orm.hibernate.GlobalSessionFactory" /> <property name="persistentClasses"> <list> <value>org.sakaiproject.poll.model.Poll</value> <value>org.sakaiproject.poll.model.Option</value> <value>org.sakaiproject.poll.model.Vote</value> </list> </property> </bean> <!-- This wraps our DAO so that the transactions are managed --> <bean id="org.sakaiproject.poll.dao.PollDao" class="org.sakaiproject.genericdao.springutil.CurrentClassLoaderTxProxyFactoryBean"> <property name="transactionManager" ref="org.sakaiproject.springframework.orm.hibernate.GlobalTransactionManager" /> <property name="target" ref="org.sakaiproject.poll.dao.impl.PollDaoTarget" /> <property name="transactionAttributes"> <props> <prop key="get*">PROPAGATION_REQUIRED,readOnly</prop> <prop key="find*">PROPAGATION_REQUIRED,readOnly</prop> <prop key="count*">PROPAGATION_REQUIRED,readOnly</prop> <prop key="*">PROPAGATION_REQUIRED</prop> </props> </property> </bean> </beans>