Hi Gary
That's pretty much what I've just done. The only difference is as I use Hibernate the datasource was already externally configured. If you're using a JDBC datasource then yes I'd use Spring to set that up as well.
The big, big advantages I'm seeing is that I'm replacing a lot of, quite involved, setup code, with some really simple (and consistent) bean setup XML in my beans.xml file. I'm also drastically reducing the dependencys of a number of classes on other classes (now they only need to know about the top most *interface* and not the concrete classes and they don't need to know at all about the constituent objects of the top-level classes).
Here's a (slightly simplified) version of my beans.xml
Code:
<standard header stuff>
<beans>
<bean id="LetterTemplateDAOBean" class="com.pti.dbmulti.db.LetterTemplateDAO"/>
<bean id="UpdateLetterTemplateActionBean" class="com.pti.dbmulti.ui.UpdateLetterTemplateAction">
<property name="LetterTemplateDAO">
<ref bean="LetterTemplateDAOBean"/>
</property>
</bean>
</beans>
Edward