>         Yes, but I don't want to open and close the session around a single
> query or update. I want to do it at the beginning and end of a request;
> so the above does not help me.

Okay... then open the query at the begining of the request, close it
at the end, and pass it to components in the middle. What does that
have to do with IHibernateDao?

Oh, okay, you're storing the session in your IHibernateDao? Yea, that
kinda defeats the whole purpose of the thing. The IHibernateDao should
just know WHERE the session actually is and how to get it. If you're
not using Spring, store the session in the request cycle and
open/close it onBegin and onEndRequest.

>         What about the technique I am currently using (deinning
> onBeginRequest(), onEndRequest())? Is it a hack or is it the correct way?

That's the accepted way to use Hibernate sessions in a web environment.


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to