CoreSession and DocumentModel have a notion of a "session id" that is used to reattach documents after they have been detached. This is actually a remnant of very old code when Nuxeo was using EJBs, but is not needed anymore.
To clean this up, we make CoreSession a lightweight object that just holds a reference to the repository name and principal it concerns. Creating one is cheap, and it doesn't hold any intrinsic resources, so there is no need for the complex caching and closing mechanism we still have today (resources are held by the Session layer which has its own pool and life cycle).
The fact that a DocumentModel can be detached and reattached to a new session just means that potentially it can refer to a different principal to do security checks through a session. But if has a principal then it's always possible to get a CoreSession and therefore view it as "attached".
- is related to
-
AICORE-392 Follow Maven modules merge changes in 11.4-SNAPSHOT
- Resolved