The examples should work though. I think this modified version of the example should work, this basically does what the HibernateTemplate does under the covers.
Code:
public class ProductDaoImpl extends HibernateDaoSupport implements ProductDao {
public Collection loadProductsByCategory(String category)
throws DataAccessException, MyException {
try {
Query queryObject = session.createQuery("from test.Product product where product.category=?");
queryObject.setString(0, category)
List result = queryObject.list();
if (result == null) {
throw new MyException("invalid search result");
}
return result;
}
catch (HibernateException ex) {
throw convertHibernateAccessException(ex);
}
}
}
http://www.springframework.org/docs/...hibernate-daos