[BLOSSOM-7] ContextLoader is not released correctly on module reload. Created: 05/Aug/10  Updated: 10/Aug/10  Resolved: 09/Aug/10

Status: Closed
Project: Blossom
Component/s: None
Affects Version/s: 1.1
Fix Version/s: 1.1.1

Type: Bug Priority: Major
Reporter: Danilo Ghirardelli Assignee: Tobias Mattsson
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   

In class BlossomModuleSupport, when calling method closeRootWebApplicationContext(), the spring application context is closed correctly, but the "contextLoader" in the class is not set to null.
When a blossom module reloads itself (which may happen on any change on /modules/<module>/config node), the spring application context can be closed, but a reference to the contextLoader is left anyway. When the start of the module is called, it finds an instance of contextLoader (even if the context is closed) and throws exception, so it's impossible to reload context until server restart. Is this wanted for some reason or it is a bug?
If it is wanted you should update the example on the wiki page to avoid spring re-initialization when the lifecicle of the module is a simple reload and not a system start/shutdown (which I think it would be a good practice anyway).



 Comments   
Comment by Tobias Mattsson [ 09/Aug/10 ]

The contextLoader variable is now set to null when the ApplicationContext is closed.

Generated at Sun Feb 11 23:29:11 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.