Refactor magnolia Context class hierarchy
(MAGNOLIA-1614)
|
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | None |
| Affects Version/s: | 3.1 M3 |
| Fix Version/s: | 3.5 RC1 |
| Type: | Sub-task | Priority: | Major |
| Reporter: | Philipp Bärfuss | Assignee: | Philipp Bärfuss |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Template: |
|
| Date of First Response: |
| Description |
|
The jcr session is not thread safe so it is wrong that all calls to MgnlContext.getSystemContext().getHierarchyManager() get the same object. This can be solved by implementing getSystemContext() very similar to MgnlContext.getInstance() by using a thread local. All this object have shared attributes, AccessManager, but acquire the jcr session (HierarchyManager) the same way as the other contexts do |
| Comments |
| Comment by ashapochka [ 02/Nov/07 ] |
|
Now HierarchyManagers are held threadlocally in HierarchyManagerLoaders in ContentRepository. To factor out them from ContentRepository altogether would have lead to too many changes in the code. So instead of storing HierarchyManager instances in ContentRepository.hierarchyManagers we store the loaders with the same keys |