Using OpenSessionInViewFilter in Spring-Hib-Wicket
H Melua
Ranch Hand
Joined: Jan 04, 2005
Posts: 168
posted
0
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
Steve Hiller
Greenhorn
Joined: Jul 25, 2008
Posts: 7
posted
0
Do you ever figured this out? There is a good explanation in the Manning book called 'Wicket in Action'.
H Melua
Ranch Hand
Joined: Jan 04, 2005
Posts: 168
posted
0
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...