Encapsulate access to session and use JcrSessionFactory when possible.
Reformatted.