You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by "Gerhard Petracek (JIRA)" <ji...@apache.org> on 2014/04/21 15:50:17 UTC

[jira] [Closed] (DELTASPIKE-334) CDI + Blueprint integration

     [ https://issues.apache.org/jira/browse/DELTASPIKE-334?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gerhard Petracek closed DELTASPIKE-334.
---------------------------------------


> CDI + Blueprint integration
> ---------------------------
>
>                 Key: DELTASPIKE-334
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-334
>             Project: DeltaSpike
>          Issue Type: New Feature
>            Reporter: Charles Moulliard
>            Assignee: Charles Moulliard
>            Priority: Minor
>
> Description should be enriched by authors (Jason, ...)
> {code}
> From:        Nodet Guillaume <gn...@redhat.com>
> Such a xml is in the META-INF/beans.xml, right ? So that you can override the behaviour of annotations ?
> I'm not sure how / where we could use it, and that does not seem really critical to me anyway.
> I think we'd better come to an understanding of the use case we'd want to cover.
> I'm thinking about:
>  * #1 create beans using the CDI container
>  * #2 inject CDI beans into blueprint beans using the blueprint xml
>  * #3 inject blueprint beans into CDI beans using @Inject
>  * #4 support CDI annotations on blueprint beans (@PostConstruct, @PreDestroy, @Inject)
> #1 is obviously needed, it could be done from the blueprint xml using a simple tag, eventually pointing to the beans.xml config file, or inline it (though inlining is not really worth the pain now imho)
> >>>>>> <cdi:container xmlns="…">
> >>>>>>     <cdi:beans url="…" />
> >>>>>> </cdi:container>
> #2 means being able to use one of the bean created from the CDI container and inject it using the xml blueprint syntax, something like
>  <bean ….>
>    <cdiroperty name="service"… />
> </bean>
> Not sure what exactly we'd need in the <cdiroperty/> element, but the idea is to use the bean setters to inject a bean created inside the CDI container
> #3 means that we'd need to be able to inject a bean created by the blueprint container using <bean/> into a @Inject annotated property of a CDI bean created by the CDI container.  In blueprint, beans are referred to by name though, so it may require a custom annotation maybe ?
> #4 means mixing CDI annotations with blueprint beans.  It's the most complicated case I think, as it needs an even closer cooperation of both containers.
> This needs to be triggered either globally or an individual bean using a flag such an xml attribute such as cdirocess="true" that could be set on a <bean/> element or a default attribute on the <cdi:container/> element.
> Cheers,
> Guillaume Nodet
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)