[MAGNOLIA-6725] DefaultMessageBundlesLoader is always re-instantiated in order to reflect changes in message bundle Created: 20/Jul/16 Updated: 05/Apr/17 Resolved: 10/Feb/17 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.5.2 |
| Type: | Improvement | Priority: | Neutral |
| Reporter: | Philip Mundt | Assignee: | Philip Mundt |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| 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)
|
||||||||||||||||||||
| Date of First Response: | |||||||||||||||||||||
| Sprint: | Basel 79, Basel 80, Basel 83 | ||||||||||||||||||||
| Story Points: | 5 | ||||||||||||||||||||
| Description |
|
While QAing The reason is that info.magnolia.i18nsystem.TranslationServiceImpl#setupMessageBundles creates a new instance of DefaultMessageBundlesLoader for each call, therefore omitting the component definition in META-INF/magnolia/i18n.xml of the i18n module. It would be desirable to use protected DefaultMessageBundlesLoader setupMessageBundles() { return componentProvider.getComponent(DefaultMessageBundlesLoader.class); } instead of protected DefaultMessageBundlesLoader setupMessageBundles() { return componentProvider.newInstance(DefaultMessageBundlesLoader.class, resourceOrigin); } in order to only maintain one component and therefore preventing potential memory leaks. However this will prevent for any changes in message properties files to be reflected in the translation service during runtime. We should investigate and also find out why the new instance call was added in the first place and what impact above change could have. |
| Comments |
| Comment by Ilgun Ilgun [ 19/Aug/16 ] |
|
How ? |
| Comment by Roman Kovařík [ 23/Jan/17 ] |
|
https://git.magnolia-cms.com/projects/PLATFORM/repos/main/pull-requests/253/overview?commentId=12757 |