Hello
Can I tell getHibernateTemplate() to use a specific session instead of the one given to the doInHibernate constructor ?
In the following sample :
HibernateCallback callback = new HibernateCallback() {
public Object doInHibernate(Session s) throws HibernateException, SQLException{
Session dom4jSession = s.getSession(EntityMode.DOM4J);
for(Iterator it=nodes.iterator(); it.hasNext(){
getHibernateTemplate().saveOrUpdate(beanref,it.nex t());
}
return code;
}
};
I would like getHibernateTemplate() to work with the dom4jSession, instead of a default one. How should I do this ?
Thanks


{
Reply With Quote