I just introduced hibernate to my new project using spring + hibernate + dwr,
All the hibernate configuration are done in the dispatcher-servlet.xml (transaction etc..),
my project lay out look like this
DwrLayer --> FacadeLayer --> Servicelayer --> DaoLayer
In the above four java class , transaction applied in FacadeLayer, so if i select some data from table with lazy loading is true, i can access all fields from FacadeLayer or Servicelayer or DaoLayer with out any lazy loading errors, But if i returned data from DwrLayer, then the lazy -true object will thrown errors, So i force to do, that setting all unwanted lazy-true object as null with in FacadeLayer before return.
Is there is any way to do it safely withg out setting object as null ?
Thanks in advance
|