jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Jackrabbit Wiki] Update of "JcrSessionHandling" by TobiasBocanegra
Date Mon, 21 Apr 2008 23:26:33 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jackrabbit Wiki" for change notification.

The following page has been changed by TobiasBocanegra:
http://wiki.apache.org/jackrabbit/JcrSessionHandling

------------------------------------------------------------------------------
  
  below some rules on how to use sessions, with the assumption that JCR sessions are '''not'''
thread safe (as specified by JSR-170).
  
- === basic rules ===
+ == basic rules ==
  * never put the JCR sessions directly into the http sessions, since if you have a lot of
http sessions, you end up having a lot of jcr sessions which might consume a lot of memory.
  * never share JCR sessions among requests, since they could not be thread safe.
  
- === read-only access, guest accounts ===
+ == read-only access, guest accounts ==
  * create a session for each request, or use a non-coupled session pool.
  
- === read-only access, personalized accounts ===
+ == read-only access, personalized accounts ==
  * create a session for each request, or use a user-coupled session pool (especially if authentication
is expensive).
  
- === read/write access, personalized accounts ===
+ == read/write access, personalized accounts ==
  * create a session for each request, or use a user-coupled session pool (especially if authentication
is expensive).
  
- === read/write access, transient mods ===
+ == read/write access, transient mods ==
  this is the only case where JCR sessions should be bound (but not stored in) http sessions.
  * create a JCR session for each http session, but be careful that you don't have them open
too long, especially if you expect a lot of http sessions.
  

Mime
View raw message