[MAGNOLIA-3755] ModuleManagerImpl should use Components to get ModuleDefinitionReader Created: 10/Jul/11  Updated: 18/Oct/11  Resolved: 18/Oct/11

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: 4.4.3
Fix Version/s: 4.5

Type: Improvement Priority: Neutral
Reporter: Kimmo Björnsson 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)
Date of First Response:

 Description   

I needed to patch the ModuleDefinitionReader-implementation because of a classloader-issue. But since ModuleManagerImpl uses BetwixtModuleDefinitionReader I had to override ModuleManager to make it use Components.

public class GrailsModuleManager extends info.magnolia.module.ModuleManagerImpl {

    public GrailsModuleManager() {
        super(new InstallContextImpl(), Components.getSingleton(ModuleDefinitionReader.class));
    }

}


 Comments   
Comment by Tobias Mattsson [ 18/Oct/11 ]

This is fixed in 4.5 as we transition to IoC and configure the ModuleDefinitionReader in module descriptors. You will be able to simply specify a ModuleDefinitionReader in your module and it will override the default.

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