Details
-
Bug
-
Resolution: Fixed
-
Neutral
-
None
-
None
-
None
Description
Commands are currently instantiated with command.getClass().newInstance(); in info.magnolia.commands.CommandsManager#getCommand, thus can't benefit from DI. They would greatly benefit from it though.
Note: perhaps we need to clarify a command instance lifecycle.
Checklists
Acceptance criteria
Attachments
Issue Links
- is related to
-
MAGNOLIA-2569 Components: introduce dependency injection
-
- Closed
-
-
MAGNOLIA-4396 Servlets should be able to use @Inject
-
- Closed
-
-
MAGNOLIA-7850 Make Commands being a definition/registry
-
- Accepted
-
- relates to
-
MAGNOLIA-5069 Write a test case for commands with injected constructors
-
- Closed
-