Joshua Davis wrote:
You can also use transfer objects with your DAOs, or turn lazy loading off
for certain classes or collections that you are using as transfer objects.
Either approach will eliminate the need for OpenSessionInView-like things
and enable you to switch DAO implemenations.   The right choice depends on
how much work you are willing to do in order to be able to switch DAO
implementations.


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.

Werner

Reply via email to