0 Replies Latest reply on May 14, 2009 5:04 PM by simit

    Initialize or Detach object's Collection

    simit

      Hi all,


      I have a query regarding usage of Seam provided Extended Persistant Context. (So this takes care of Lazy Loading Exception)


      I have unique requirement.I need to show a Tree view. Now, as it is obvious, there is Parent and child (one to many) relationship between Top Level element and their child elements. Tree can be expanded up to 5 level.


      Now, Initially for Top level, there would be some 10 to 30 nodes available. Now, when User clicks on any certain node, then due to Lazy loading, I will be getting data for its children. So far , so good. Now If User, collapse this Parent node, I want to Initialize this collection or Detach objects in this collection, so that these objects could be garbage collected.


      Also, I am using Rich Faces for GUI, thus, I am using Stateful Session Bean as a ActionListener and on this bean Persistance context object will reside. This bean will have scope as Session.


      Does EJB 3.0 persistence context provide any such mechanism???