Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Boell Fischer   on Mar 06 In Java Category.

  
Question Answered By: Sheryl Morgan   on Mar 06

i tried it with forms in session scope but no changed occured and the previous error araised.

about my code: i don't use any special code  i use the following code for getting my objects from DB :


public List getPolicies(){

return getHibernateTemplate().executeFind(
new HibernateCallback()
{
public Object doInHibernate(Session session)
throws HibernateException, SQLException {

Criteria crit = session.createCriteria(Policy.class);
return crit.list();

}

});

}


and after that in my jsp i print objects exist in Policy through its getter method.

i tried another solution for lazy fetching in spring, ie: openSessionInViewInterceptor.
but what wrong goes with this strategy is that session is closed when i want to access any objects in object Policy

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on OpenSessionInViewFilter problem Or get search suggestion and latest updates.