[cdi-dev] [JBoss JIRA] (CDI-114) Allow registration of beans at runtime

Vincent Massol (JIRA) issues at jboss.org
Mon Feb 20 04:01:00 EST 2017

    [ https://issues.jboss.org/browse/CDI-114?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13365902#comment-13365902 ] 

Vincent Massol commented on CDI-114:

[~rmannibucau] I think xwiki component == cdi bean. Basically an XWiki component has a lifecycle (instantiation, injection, disposal) managed by the XWiki Component Manager. The goal of of using CDI for us would be to drop our Component Manager in favor of CDI (I guess it's the Bean Manager in CDI parlance but I'm a newbie so I could use the wrong terminology).

Regarding the scripted macros, it's a special case. The way we handle this now is that the XWiki Component Manager has two ways to register a new component: by passing a Class/Type and it would instantiate it itself or by passing an existing instance (in which case, it'll not perform the instantiation but it'll still perform the populate/injections). As you mentioned, I guess that the equivalent in CDI is the Producer strategy.

> Allow registration of beans at runtime
> --------------------------------------
>                 Key: CDI-114
>                 URL: https://issues.jboss.org/browse/CDI-114
>             Project: CDI Specification Issues
>          Issue Type: Feature Request
>          Components: Beans
>    Affects Versions: 1.0
>            Reporter: Vincent Massol
>             Fix For: TBD
> I have use cases where I need to register a bean dynamically at runtime (see the forum reference link for a detailed description of the use case).

This message was sent by Atlassian JIRA

More information about the cdi-dev mailing list