[cdi-dev] [JBoss JIRA] (CDI-579) Extension disqualifies a jar as 'implicit bean archive'?

Romain Manni-Bucau (JIRA) issues at jboss.org
Tue Jan 26 02:54:00 EST 2016

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

Romain Manni-Bucau commented on CDI-579:

>From my understanding when I impl-ed it in TomEE it was for existing extension registering beans from jars without beans.xml. If these jars are now auto discovered the app can be broken.

That said I still think it is rare enough - [~mkouba] I don't think my experience represents the whole CDi community but 1. nobody said me I was wrong cause they met another case until now , 2. we can get a polling as we did for @New.

Just passively thinking it can be used and add a mess in the spec for that is not the best default IMO (feature flag are a headache most of the time for deployers/users so if we can avoid it it would be better. If we cant then fine to add a flag or a new API in extensions to activate annotated mode).

> Extension disqualifies a jar as 'implicit bean archive'?
> --------------------------------------------------------
>                 Key: CDI-579
>                 URL: https://issues.jboss.org/browse/CDI-579
>             Project: CDI Specification Issues
>          Issue Type: Bug
>            Reporter: Mark Struberg
>            Priority: Minor
> The bean-discovery-wording is a bit odd. 
> This has been in since CDI-1.1
> {code}
> An archive which:
> • contains a beans.xml file with the bean-discovery-mode of none, or,
> • contains an extension and no beans.xml file is not a bean archive.
> is not a bean archive.
> {code}
> That means even if you have an @ApplicationScoped MyService class in a jar which has a single CDI Extension then this MyServices will *not* get picked up as CDI bean? At least according to this wording?
> Feels mega-weird to me and might conflict with the implicit beans archive definition a few lines below.
> I'm pretty sure in OWB we will pick those beans up. How does Weld behave?

This message was sent by Atlassian JIRA

More information about the cdi-dev mailing list