[cdi-dev] [JBoss JIRA] (CDI-539) Support for 'profile' in CDI

Jozef Hartinger (JIRA) issues at jboss.org
Thu Jul 9 07:53:03 EDT 2015

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

Jozef Hartinger commented on CDI-539:

This is exactly what @Alternative @Stereotypes are for in CDI. You can create your own "profiles" by introducing a stereotype annotated with @Alternative, e.g. @Mock, @Production etc. You can then activate the stereotypes you want active in beans.xml. This concept should be extended in CDI 2.0 to work with @Priority and CDI extensions.

> Support for 'profile' in CDI
> ----------------------------
>                 Key: CDI-539
>                 URL: https://issues.jboss.org/browse/CDI-539
>             Project: CDI Specification Issues
>          Issue Type: Feature Request
>          Components: Contexts
>            Reporter: Dhiraj Dwarapudi
> I would like to activate a set of beans at application start-time. Currently I can use Programmatic lookup in CDI for dynamically injecting the beans. But I believe it'll be easier with better support for this.
> Spring has a nice support for this with the concept of a 'Profile':
> https://spring.io/blog/2011/02/14/spring-3-1-m1-introducing-profile/
> Would be really helpful if CDI has support for this. 

This message was sent by Atlassian JIRA

More information about the cdi-dev mailing list