[MAGNOLIA-2159] session can be closed if LazyContentWrapper is used Created: 28/May/08  Updated: 23/Jan/13  Resolved: 28/May/08

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: 3.5.7, 3.6
Fix Version/s: 3.5.8, 3.6

Type: Bug Priority: Critical
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:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

It is the nature of the LazyContentWrapper to refetch the wrapped node again if the session has been closed. That is fine. If you then access children later it might be that the former session has been closed because it has been handled by another thread:

  • thread1 creates session1
  • thread1 uses LazyContentWrapper so the node is bound to session1
  • thread2 creates session 2
  • thread2 uses LazyContentWrapper but session1 is still open and so used
  • thread2 gets a child of the node (this child node is of type DefaultContent)
  • thread1 closes session1
  • thread2 tries to use the child node and it fails with a session closed exception


 Comments   
Comment by Philipp Bracher [ 28/May/08 ]

This brings us back to the discussion about using shared sessions for the system context. This might be OK as we have to keep sessions for the observation anyway

Comment by Philipp Bracher [ 28/May/08 ]

I have been able to fix the issue. I will think about moving back to SingleJCRSessionSystemContext

Generated at Mon Feb 12 03:33:59 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.