Storing the hibernate session in my wicket.Session would make it impossible to have several parallel application transactions going on, e.g. when operating with multiple browser windows.
I know that you guys are very careful about what methods to expose to us Wicket users, but perhaps the final on Session#getPage(String,String,int) could be dropped? I'm in need for this for another thing too: My pages get their dependencies through Spring (utilizing a custom PageFactory) and hold them in transient members. When a session (and its pages) gets serialized/deserialized all dependencies are lost. What I really would like to have is the opportunity to reinject these dependencies before any code is triggered on this pages. Thanks Sven > >I think it is a better idea to store the current session in your >wicket.Session object (you can create your custom session objects by >providing your own ISessionFactory, which can be done by overriding >Application.getSessionFactory. For the housholding, you could best use > a custom request cycle (override >wicket.protocol.http.WebSession#getRequestCycleFactory()) and >override onBeginRequest and onEndRequest. > >The problem with trying to do this with pages, is that there is no >guarantee that the same page is called at the end of the request; any >listener code code code set another page for rendering. > >One of the things we should do for 1.2. is further formalize our >request handling and adding clear hooks into it. > >Eelco > > >On 10/7/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >> Hello, >> >> I'm in need for a notification when a wicket page is accessed, i.e. when a >component listener is invoked. >> >> Why? >> I want to use Hibernate 'application transactions' >(http://www.hibernate.org/168.html): Each wicket page has its own Hibernate >session which is kept open until the corresponding use case ends. >> >> What I have to do is disconnect() and reconnect() the Hibernate session for >each request to this page. >> >> But I cannot find a hook in Wicket, where I could do this housekeeping >*before* my code on that page is triggered. All my investigations are running >into private and final methods :(. >> >> Does anybody have an idea for this scenario? Did I miss something? >> Any chance that some sort of 'page interceptor facility' could be >incorporated into Wicket? >> >> Thanks >> >> Sven >> >> >> ------------------------------------------------------- >> This SF.Net email is sponsored by: >> Power Architecture Resource Center: Free content, downloads, discussions, >> and more. http://solutions.newsforge.com/ibmarch.tmpl >> _______________________________________________ >> Wicket-user mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/wicket-user >> > > >------------------------------------------------------- >This SF.Net email is sponsored by: >Power Architecture Resource Center: Free content, downloads, discussions, >and more. http://solutions.newsforge.com/ibmarch.tmpl >_______________________________________________ >Wicket-user mailing list >[email protected] >https://lists.sourceforge.net/lists/listinfo/wicket-user ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ Wicket-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-user
