• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Using OpenSessionInViewFilter in Spring-Hib-Wicket

 
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello

I'm having a problem with the lazy loading exception...

Why does this happen? because i load some data and view it in a page, and here the session transaction ends... and when i try to delete one of the listed items i get the error as the session no longer exists...

the hibernate documentation recommended using OpenSessionInViewFilter to overcome this problem, but i found it too complicated to figure out exactly how to do it

I'm using applicationContext.xml where all my hibernate+spring wiring goes to..

what do i need to change in my xml file in order to make these session open as long as possible?

Thanks
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you ever figured this out? There is a good explanation in the Manning book called 'Wicket in Action'.
 
H Melua
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Steve

I figured out my mistake... I was trying to cache a service object that shouldn't be cached since it is used by all other pages...
 
reply
    Bookmark Topic Watch Topic
  • New Topic