aspose file tools*
The moose likes Other Application Frameworks and the fly likes Using OpenSessionInViewFilter in Spring-Hib-Wicket Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Using OpenSessionInViewFilter in Spring-Hib-Wicket" Watch "Using OpenSessionInViewFilter in Spring-Hib-Wicket" New topic
Author

Using OpenSessionInViewFilter in Spring-Hib-Wicket

H Melua
Ranch Hand

Joined: Jan 04, 2005
Posts: 172
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
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: 172
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...
 
Don't get me started about those stupid light bulbs.
 
subject: Using OpenSessionInViewFilter in Spring-Hib-Wicket
 
Similar Threads
Hibernate Entity Beans in HTTP Session
using c:forEach with spring/hibernate lazy loading
using c:forEach with spring/hibernate lazy loading
OpenSessionInViewFilter does not help, Spring + Hibernate
LazyInitializationException [spring + struts2]