On 7/15/06, Iman Rahmatizadeh <[EMAIL PROTECTED]> wrote:
> Hi,
> AFAIK, there are three ways of implementing application transactions,
> lazy loading, etc. stuff  with Wicket & Hibernate :
> 1 - The hard way, where you pass object ids, and load & save them in
> each request cycle using a new session
> 2 - The detached object way, where you attach the old objects in each
> request cycle to a new session
> 3 - Using long sessions, where you keep a session during multiple
> requests and finally close when the unit of work is finished

I simply added:



to my web.xml. This keeps a session open during the whole request,
allowing detached objects to attach to the EM again and traverse lazy
loaded relations.

This is for JPA in a Spring environment though.

I wonder after reading all the discussion about this subject here
whether this is a good solution or not. It works for me and my
specific application. What about your app?


Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
Wicket-user mailing list

Reply via email to