Hello,
within the framework of the development of an application J2EE using Spring 2.0 and Hibernate 3.1, I have a problem on the level of the beans. I am explained, one of my beans allows to post the data of a process in the shape of a tree (use of icefaces). A process contains a collection of objects which them same contain collections objects. I defined the loading of the collections in lazy=true in the Hibernate mapping. The problem is that when the bean responsible for the construction of the tree calls the compromise service for the data loading, only the objects of the collection of the process are loaded and when the construction of the first level of the tree is finished and that the bean request information on the collections in lazy=true, synchronization with the initial session hibernate is lost. I let Spring manage the sessions of each transaction automatically. I have just read not badly documents on the concept of attachment/detachment from POJOs but the examples are not very clear and do not take into account a Spring/Hibernate architecture.
Or must I make my attachments? On the level of DAOs ? in the beans ? Are the detachments made all only with the closing of the transaction or must I even manage them me? Have you some relevant links or tutorials on these concepts ?
In advance thank you….
|