[MAGNOLIA-7003] CLONE - DefaultMessageBundlesLoader is always re-instantiated in order to reflect changes in message bundle Created: 05/Apr/17 Updated: 04/Mar/19 |
|
| Status: | Open |
| Project: | Magnolia |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Neutral |
| Reporter: | Christian Ringele | Assignee: | Unassigned |
| Resolution: | Unresolved | 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)
|
||||||||
| Story Points: | 5 | ||||||||
| Description |
|
No matter what I do, changes in message bundles are not reloaded. From the original ticket: 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. |