It sounds like you're looking for "transaction-per-request" and not
"session-per-request."  The "session-per-request" part is easy.  Just
use the OpenSessionInViewFilter from Spring (as stated by someone else
on this thread).  The OpenSessionInViewFilter doesn't begin a
transaction for you automatically.  It merely opens the session and
closes it for you.


On 2/13/08, Sébastien Piller <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I'm searching for a best practice to integrate some hibernate
> transaction with Wicket. I'd like to implement the "session-per-request"
> that is described here
> http://www.hibernate.org/hib_docs/v3/reference/fr/html_single/#tutorial-firstapp-workingpersistence
>
> I think I can commit the transaction and close the session on the
> "onAfterRender" method. But where is the best place to start it? On the
> first line of the constructor? Or in the onBeforeRender (I think not)?
> Anywhere else?
>
> And what about the ajax queries? I need to recreate a new transaction
> for each ajax request, need I?
>
> Thank you a lot for your think :)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to