wood burning stoves 2.0*
The moose likes Other Application Frameworks and the fly likes OSIV in wicket - legacy servlet application ... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "OSIV in wicket - legacy servlet application ..." Watch "OSIV in wicket - legacy servlet application ..." New topic
Author

OSIV in wicket - legacy servlet application ...

Grace Russo
Ranch Hand

Joined: Nov 08, 2010
Posts: 64
Would you recommend using a wicket RequestCycleListener to implement the OSIV pattern and storing the hibernate session in a threadlocal ? WOudl there be a way for me to make the hibernate session stored in this ThreadLocal to be available in regular servlets (my app is currently a mix of wicket pages and legacy servlets ? The problem I am encountering is that in the legacy servlets, if I try MyRequestCycleListener.getSession(), the #onEndRequest has already been executed and the session in the ThreadLocal has already been closed.
For the legacy servlets should I use a regular servlet filter ?
Any comments ? tips ?


In MyRequestCycle, I do use the ManagedSessionContext to bind/unbind the hibernate Session:
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: OSIV in wicket - legacy servlet application ...
 
Similar Threads
need good example of hibernate with composit key
Question about a code snippet from book "beginning hibernate"
question about using localthread in hibernate?
I want to know how to use methods furnished below in this program???
Tapestry Hibernate / session