Hi
I'm writing a DAO using spring and hibernate
public class DaoImpl extends HibernateDaoSupport implements Dao {}
For reading or updating data I'm using HQL getHibernateTemplate().bulkUpdate(...)
but one of the queries is too complex for that and I need to use native SQL Query query = getSession().createSQLQuery(...)
But doing that hangs my application
DEBUG org.hibernate.jdbc.ConnectionManager - opening JDBC connection
I can prevent this by setting DataSource maxActive field unlimited, but that's not a solution. My question is that is there any solid way of using native SQL with HibernateDaoSupport? Very important is that native queries needs to be executed in same transaction as other (HQL) queries.
Thanks