Hibernate Transaction Manager should have the datasource set on it along with the session factory so it can manage JDBC as well
Description
Environment
None
Test Plan
None
Attachments
1
Activity
Show:

Ian Boston August 21, 2008 at 4:42 PM
Patch appled to 2.5, will link to new issue and apply to kernel

Aaron Zeckoski May 19, 2008 at 11:57 AM
On a side note, if the linked issue is applied then this patch is not really necessary, however, this is really a patch for 2.5.0 where the other one is for trunk. There should be zero chance of this patch causing a failure.
This is a very minor change which simply allows the transaction manager to be used to manager JDBC and hibernate transactions together. This allows services to use both together and still have proper transaction handling.
Here is the complete change that would be needed:
Add this to the global transaction manager bean: <property name="dataSource" ref="javax.sql.DataSource" />
<!-- The "Global" Transaction Manager -->
<bean
id="org.sakaiproject.springframework.orm.hibernate.GlobalTransactionManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory">
<ref bean="org.sakaiproject.springframework.orm.hibernate.GlobalSessionFactory" />
</property>
<property name="dataSource" ref="javax.sql.DataSource" />
</bean>
Patch is attached, though I can also commit this to the DB project.