-
1. Re: lazy initialization leads to org.hibernate.LazyInitializ
cyril.joui May 11, 2006 11:25 AM (in response to lindner)Hello,
You must initialize all lazy relation on EJB container before using them on the client !
Try to do, in method find...() {
BeanB b = em.find(BeanB.class, id);
// intialize A !
b.getA().getId()
return b;
}
The client if out of the EJB container ... -
2. Re: lazy initialization leads to org.hibernate.LazyInitializ
lindner May 13, 2006 3:17 AM (in response to lindner)Hello Cyril,
but what is lazy loading good for if I alwayas have to preload lazy attributes bevore transfering them to the client? Is there now way to do this on demand in an elegant way? Some frameworks? Some design patterns? -
3. Re: lazy initialization leads to org.hibernate.LazyInitializ
lindner May 13, 2006 7:36 AM (in response to lindner)There must be some sort of interceptor that does the lazy loading. Isn't it possible to modify this interceptor? If I understand the ejb specification correctly, custom interceptors are only possible for session and message beans, not for entity beans.
-
4. Re: lazy initialization leads to org.hibernate.LazyInitializ
epbernard May 18, 2006 7:10 PM (in response to lindner)The framework you're looking for is JBoss Seam