> -----Original Message-----
> From: news [mailto:[EMAIL PROTECTED] On Behalf Of Werner Punz
> Sent: Wednesday, August 31, 2005 2:46 PM
> To: [email protected]
> Subject: Re: JSF + Spring + Hibernate
>
> I still do not see the problem of the opensessioninview filter...
> the method is totally transparent, and if you are in need for 
> a different dao layer, then simply turn it off on the pages 
> where you already have replaced the layer.
> The filter itself, just simplifies the handling of lazy 
> loaded objects in a transparent way to the programmer, so 
> that he in most cases does not have to care anymore if the 
> object is lazily bound or not.

I agree completely.

I didn't mean to imply that I think there is a problem with
OpenSesisonInView or OpenSessionInView or anything like it (I made something
similar using PhaseListener).  There is some chance that a programmer might
get into some problems with improper (according to Hibernate) use of
sessions and proxies (lazy loaded objects), but as long as you make sure
that the objects that are loaded by Hibernate have the same scope as the
Hibernate session everything works very nicely.

[EMAIL PROTECTED]


Reply via email to