[MAGNOLIA-2569] Components: introduce dependency injection Created: 22/Jan/09  Updated: 12/Apr/13  Resolved: 09/Mar/12

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

Type: New Feature Priority: Major
Reporter: Philipp Bärfuss Assignee: Magnolia International
Resolution: Fixed Votes: 0
Labels: cdi, ioc, picocontainer
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: Not Specified Time Spent: Not Specified
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Issue Links:
dependency
depends upon MAGNOLIA-2553 FactoryUtil: should return a proxy ob... Closed
depends upon MAGNOLIA-3086 Module instances could be proxies too Closed
is depended upon by MAGNOLIA-3541 Inconsistency in properties naming (a... Closed
relation
is related to MAGNOLIA-2383 TemplateRenderer should be instantiat... Closed
is related to MAGNOLIA-3736 IoC: startables are started at regist... Closed
is related to MAGNOLIA-4972 Commands should be able to use @Inject Closed
is related to MAGNOLIA-3517 Module descriptor additions Closed
is related to MAGNOLIA-3079 ComponentProvider should lookup super... Closed
is related to MAGNOLIA-4396 Servlets should be able to use @Inject Closed
supersession
supersedes MAGNOLIA-3376 ServletContext should be available to... Closed
is superseded by MAGNOLIA-4156 ioc: guice Closed
Sub-Tasks:
Key
Summary
Type
Status
Assignee
MAGNOLIA-3525 Support for using a custom TypeMappin... Sub-task Closed Tobias Mattsson  
MAGNOLIA-3530 Deprecate SystemProperties and Proper... Sub-task Closed Magnolia International  
MAGNOLIA-3538 Restore or drop support for module pr... Sub-task Closed Magnolia International  
MAGNOLIA-3592 support subcontainers and populating ... Sub-task Closed Philipp Bärfuss  
MAGNOLIA-3596 allow passing parameters to the newIn... Sub-task Closed Philipp Bärfuss  
MAGNOLIA-3599 IoC: pass the current component provi... Sub-task Closed Philipp Bärfuss  
MAGNOLIA-4035 Revise content2bean Sub-task Closed  
Template:
Acceptance criteria:
Empty
Date of First Response:

 Description   

After a whole history of improvements (factories, configuration in repo, content2bean, proxies for observed components), we should now be able to start to use dependency injection.

Candidate frameworks: PicoContainer, Guice, or something custom using annotations.

Some background and notes: http://wiki.magnolia-cms.com/display/DEV/Concept+IOC+in+Magnolia



 Comments   
Comment by Magnolia International [ 26/Jan/11 ]

A few Hudson comments got lost because I used the wrong jira id in some commits:

MAGNOLIA-2569 renamed test to make sure it's executed, and now calling handler.saveValue() instead of handler.execute("saveValue") to avoid depending on commands
MAGNOLIA-2569 * MgnlServletContextListener instantiates PicoContainers (to be abstracted), populates the root container with the necessary minimal components, populates main container with properties/modules configured component, fires up container and ConfigLoader.

  • Removed unnecessary properties from mgnl-beans.properties (some are "hardcoded" in the root container at startup, some are not needed anymore), and added some missing ones
    MAGNOLIA-2569 Now stops pico on contextDestroyed
    MAGNOLIA-2569 Renamed info.magnolia.cms.servlets.MgnlServletContextListener to info.magnolia.init.MagnoliaServletContextListener
    MAGNOLIA-2569 Renamed info.magnolia.cms.servlets.MgnlServletContextListener to info.magnolia.init.MagnoliaServletContextListener
    MAGNOLIA-2569 shuffling method order
Generated at Mon Feb 12 03:37:59 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.