I think the problem is as follows: With lazy loading, objects are not loaded until referenced. Until then, references are to proxy objects. So, since all loads need to be done in the context of a session, if you load a parent object and never reference the child object until after the session has been closed, you will get a lazy initialization exception

"reubenf" wrote:I think the problem is as follows: With lazy loading, objects are not loaded until referenced. Until then, references are to proxy objects. So, since all loads need to be done in the context of a session, if you load a parent object and never reference the child object until after the session has been closed, you will get a lazy initialization exception

Yes, i've realized that before.... but there is no way to configure the container in order to work with lazy load without problems?

If you use Spring (I do not) there ist a OpenSessionInViewFilter you can use (I think you only have to configure it in the web.xml)But I do not really understand how to implement the OSIV-Pattern by myself when I use EJB.... ???Perhaps you have some ideas.