title: Do we need to close Resource Resolver and Session both?
body: <p>I am getting a ResourceResolver Object from ResourceResolverFactory i.e. I am creating this resourceResolver and I am adapting to Session.</p>
  
  <pre><code>Session session = resourceResolver.adaptTo(Session.class);
  </code></pre>
  
  <p>Do I need to close both, the resolver and the session or closing one would be suffice?</p>
  
  <pre><code>finally {
      if (session != null &amp;&amp; session.isLive()) {
          session.logout();
      }
  
      if (resourceResolver != null &amp;&amp; resourceResolver.isLive()) {
          resourceResolver.close();
      }
  }
  </code></pre>
  
  <p><em>This question is about "should we be closing both" and  not which to close first</em></p>