3.1.1. Using JCR

3.1.1.1. Obtaining repository object
3.1.1.2. JCR application practices

Warning

You are looking at documentation for an older release. Not what you want? See the current release documentation.

JCR Session common considerations

  • Remember that javax.jcr.Session is not a thread safe object. Thus, never try to share it between threads.

  • Do not use System session from the user related code because a system session has unlimited rights. Call ManageableRepository.getSystemSession() from process related code only.

  • Call Session.logout() explicitly to release resources assigned to the session.

  • When designing your application, take care of the Session policy inside your application. Two strategies are possible: Stateless (Session per business request) and Stateful (Session per User) or some mixings.

Copyright ©. All rights reserved. eXo Platform SAS
blog comments powered byDisqus