There's been a lot of talk about how to do this in a filter, but does anyone
have sample code? I've been drooling over this ever since I first heard
about it. Is the example on Hibernate's site sufficient, or are there
examples from Patrick's upcoming book that might be helpful? I haven't seen
the conductor project yet on java.net. 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Francisco Hernandez
Sent: Saturday, October 25, 2003 11:20 AM
To: [EMAIL PROTECTED]
Subject: Re: [OS-webwork] Hibernate with interceptor

I was planning on moving session opening and closing into interceptor, right
now im opening one session per dao operation which is not good!

im also looking into using Spring and then theres the code from Patrick's
book, im waiting to see that before I refactor though.

John Patterson wrote:
> I notice that in previous discussions on this list, people talk a lot 
> about using ServletFilters to open a Session and ensure it is closed.
> Is there any problem with using an interceptor to do this?
>  
> ie
>  
> public String intercept(ActionInvocation invocation) {
>     try
>     {
>         ...open session...
>         invocation.invoke();
>     }
>     finally
>     {
>        ...close session...
>     }
> }
>  
> John.
>  











-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community?  Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to