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: <filter> <filter-name>OpenEntityManagerInViewFilter</filter-name> <filter-class>org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter</filter-class> </filter> <filter-mapping> <filter-name>OpenEntityManagerInViewFilter</filter-name> <url-pattern>/test/*</url-pattern> </filter-mapping> 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? S. ------------------------------------------------------------------------- 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 http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user