You can do that too. Personally, I prefer to not have that extra layer. Eelco
On 10/7/05, Andrew Berman <[EMAIL PROTECTED]> wrote: > Why don't you just write a filter? It looks like > someone already wrote one: > http://opensource2.atlassian.com/confluence/spring/pages/viewpage.action?pageId=1447 > > > --- Eelco Hillenius <[EMAIL PROTECTED]> wrote: > > > 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 > ------------------------------------------------------- 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
