deltaspike-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Charles Moulliard (JIRA)" <>
Subject [jira] [Created] (DELTASPIKE-334) CDI + Blueprint integration
Date Tue, 26 Mar 2013 07:57:15 GMT
Charles Moulliard created DELTASPIKE-334:

             Summary: CDI + Blueprint integration
                 Key: DELTASPIKE-334
             Project: DeltaSpike
          Issue Type: New Feature
            Reporter: Charles Moulliard
            Priority: Minor

Description should be enriched by authors (Jason, ...)

From:        Nodet Guillaume <>

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"… />
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.

Guillaume Nodet

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message