Details
-
Feature Request
-
Resolution: Won't Do
-
Major
-
None
-
3.5.0.Final
-
None
Description
JCR and ModeShape expect that Sessions are lightweight and should be created for each separate "task". Sessions can be reused, but really creating new sessions is fast and just as good (if not better). JCR sessions are also not thread safe, so multi-threaded applications should never use one session for multiple activities (except possibly reading, but even then ...)
Since the template code to create a session, do something, save the session (if needed), and always log out of the session is almost always the same, perhaps
ModeShape should provide an easy to way to tell ModeShape what should be done in a session. A functional style API would work well.