-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove generic-dao dependency #19
Comments
I attempted to change to using Spring's TransactionProxyFactoryBean (TPFB) like so (similar to how rwiki uses the TPFB): <!-- DAO. This uses the DataSource that has already been setup by Sakai -->
<bean id="org.sakaiproject.attendance.dao.AttendanceDaoTarget"
class="org.sakaiproject.attendance.dao.impl.AttendanceDaoImpl"
init-method="init">
<property name="sessionFactory" ref="org.sakaiproject.springframework.orm.hibernate.GlobalSessionFactory" />
</bean>
<!-- Attendance Data Access Object -->
<bean id="org.sakaiproject.attendance.dao.AttendanceDao"
class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="transactionManager" ref="org.sakaiproject.springframework.orm.hibernate.GlobalTransactionManager" />
<property name="target" ref="org.sakaiproject.attendance.dao.AttendanceDaoTarget" />
<property name="transactionAttributes">
<props>
<prop key="get*">PROPAGATION_SUPPORTS,readOnly</prop>
<prop key="*">PROPAGATION_REQUIRED</prop>
</props>
</property>
</bean>
<!-- AttendanceLogic -->
<bean id="org.sakaiproject.attendance.logic.AttendanceLogic"
class="org.sakaiproject.attendance.logic.AttendanceLogicImpl"
init-method="init">
<property name="dao" ref="org.sakaiproject.attendance.dao.AttendanceDao" />
<property name="sakaiProxy" ref="org.sakaiproject.attendance.logic.SakaiProxy" />
</bean> And then was met with an exception on startup:
Changing the DAO property from Any suggestions? So far I've tried making the TPFB abstract and making another bean whose parent is the TPFB (and then updated other beans to use that bean whose parent is the TPFB). Similar to what is used here. I've also tried changing the order of the bean definitions, but that causes no change; I suspect that the order does not matter. |
Looks like the only need for gerneric-dao happens to be around transactions:
Might make sense to just use springs TransactionProxyFactoryBean instead, then you won't need to use a deprecated lib.
The text was updated successfully, but these errors were encountered: