[cdi-dev] [JBoss JIRA] (CDI-157) Enabling/Disabling Extensions

Mark Struberg (JIRA) jira-events at lists.jboss.org
Fri Sep 14 12:42:32 EDT 2012

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

Mark Struberg commented on CDI-157:


# Add a way to register Extensions via beans.xml, e.g <extensions><class enabled="true" ordinal="17">...
# Treat any Extension registered via META-INF/services/... as registered with enabled="true" and an ordinal="1"

That would allow users to just define another beans.xml with a highter ordinal where he can disable the Extension. 

Containers must pickup all Extensions registered via META-INF/Services plus all Extensions registered via beans.xml. For each Extension class only the entry with the highest ordinal counts. In case this evaluates to enabled="true" the CDI Container shall instantiate and enable the Extension, otherwise it shall get skipped.

> Enabling/Disabling Extensions
> -----------------------------
>                 Key: CDI-157
>                 URL: https://issues.jboss.org/browse/CDI-157
>             Project: CDI Specification Issues
>          Issue Type: Feature Request
>    Affects Versions: 1.0
>            Reporter: Pete Muir
>             Fix For: 1.1 (Proposed)
> Typically an extension class is packaged in a jar, along with a META-INF/services/javax.enterprise.inject.spi.Extension file which enables it. However, this means that an application, or another extension, has no way of disabling extensions.

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: http://www.atlassian.com/software/jira

More information about the cdi-dev mailing list