[
https://issues.jboss.org/browse/CDI-579?page=com.atlassian.jira.plugin.sy...
]
Arjan t commented on CDI-579:
-----------------------------
Was thinking about the following:
Mojarra is normally a container jar. Since it uses CDI there's a CDI extension. Since
container jars are not automatically scanned, annotated classes can be added via
{{BeforeBeanDiscovery.addAnnotatedType}}.
But Mojarra can also be used from an application archive and put into WEB-INF/lib.
Now it helps that it's not an implicit bean archive, otherwise the same class would be
added twice; by the extension and via the scanning process. Probably it would be better to
have a beans.xml file with bean-discovery-mode of none, but perhaps this was the use case
for the "Extension disqualifies a jar as 'implicit bean archive'" was
added?
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
(v6.4.11#64026)