title: JCR 2.0 how right use session
body: <p>This guide <a href="http://wiki.apache.org/jackrabbit/JcrSessionHandling" rel="nofollow">JCR Wiki</a> proposes the use of a new session for each request. My task is to create a tree of jackrabbit files. So going by this guide to get properties/ nodes of each item, I would need to create new session and close it later? This way I would create a lot of sessions every time, which looks strange. </p>
  
  <p>But if I use one session for all time for JCR I have problem with MemoryHeapException in JCR side and not right saved nodes sometimes. </p>
  
  <p>Are there any norms towards an approach between using one session and creating a session every time? Or am I misreading the guide?</p>