[MAGNOLIA-6073] Different instances of components after error forward Created: 12/Feb/15  Updated: 03/Apr/17  Resolved: 22/Mar/17

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: 5.0
Fix Version/s: 5.4.12, 5.5.3

Type: Bug Priority: Major
Reporter: Christoph Meier Assignee: Roman Kovařík
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Tomcat 7.0.6, 7.0.42, 7.0.59, 6.0.37


Issue Links:
Relates
relates to MGNLPN-359 NPE at PersonalizedNodeRenderingListener Closed
causality
is causing MAGNOLIA-6012 Ensure a page defined in 404-section ... Closed
dependency
is depended upon by MGNLEE-483 Integration tests for error pages Closed
duplicate
is duplicated by MGNLPN-359 NPE at PersonalizedNodeRenderingListener Closed
relation
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:
Sprint: Kromeriz 88
Story Points: 3

 Description   

During tomcat forward to error page there exists two different instances of AggregationState and WebContext components.

1.) MgnlContext.getAggregationState()
The ContextFilter creates a new AggregationState when creating an new WebContext.

2.) Components.getComponent(AggregationState.class)
IoC (LocalScope) holds an instance of AggregationState in the request which is the old state before forwarding.

E.g. MultiSiteFilter (per WebContext) and MultiSiteURI2RepositoryManager (per IoC) gets different instances of AggregationState.

Additional the old aggregation state in IoC may hold old nodes (e.g. state.getMainContentNode()) which have an already closed jcr session.



 Comments   
Comment by Evzen Fochr [ 08/Mar/17 ]

Get rid of workaround in MGNLPN-359 too.

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