[cdi-dev] [JBoss JIRA] Commented: (CDI-87) Declarative control over classes including in bean archive scanning
Geoffrey De Smet (JIRA)
jira-events at lists.jboss.org
Mon Sep 5 07:56:26 EDT 2011
[ https://issues.jboss.org/browse/CDI-87?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12626218#comment-12626218 ]
Geoffrey De Smet commented on CDI-87:
-------------------------------------
CDI remains is opt-out by default, which breaks transitive reuse of CDI jars.
Presume this reuse scenario:
seam-solder has solderBeans.xml
seam-security depends on seam-solder and has securityBeans.xml
guvnor depends on seam-security (but not directly on seam-solder) and has guvnorBeans.xml. Transitively, seam-solder appears in the classpath.
So when guvnorBeans.xml does:
<weld:scan><weld:include>securityBeans.xml</weld:include></weld:scan>
it fails, because solderBeans.xml isn't activated,
because securityBeans.xml doesn't define it's dependent beans.xml explicitly.
The hack of specifying to include solderBeans.xml in guvnorBeans.xml, is bad:
- guvnor doesn't want to know about solder. It's transitive: let seam-security take the heat for it.
- the next version of seam-security might no longer use solderBeans.xml (or instead need extra Beans.xml) => upgrading becomes hard
Possible solution: a beans.xml file should explicitly define its beans.xml dependencies.
> Declarative control over classes including in bean archive scanning
> -------------------------------------------------------------------
>
> Key: CDI-87
> URL: https://issues.jboss.org/browse/CDI-87
> Project: CDI Specification Issues
> Issue Type: Feature Request
> Components: Packaging and Deployment
> Affects Versions: 1.0
> Reporter: Pete Muir
> Fix For: 1.1 (Proposed)
>
>
> Weld introduced a XML syntax for this
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the cdi-dev
mailing list