[JBoss JIRA] Issue Comment Edited: (CDI-87) Declarative control over classes including in bean archive scanning
by Geoffrey De Smet (JIRA)
[ https://issues.jboss.org/browse/CDI-87?page=com.atlassian.jira.plugin.sys... ]
Geoffrey De Smet edited comment on CDI-87 at 9/5/11 7:59 AM:
-------------------------------------------------------------
CDI 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.
was (Author: ge0ffrey):
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
13 years, 3 months
[JBoss JIRA] Commented: (CDI-87) Declarative control over classes including in bean archive scanning
by Geoffrey De Smet (JIRA)
[ https://issues.jboss.org/browse/CDI-87?page=com.atlassian.jira.plugin.sys... ]
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
13 years, 3 months
[JBoss JIRA] Commented: (CDI-87) Declarative control over classes including in bean archive scanning
by Geoffrey De Smet (JIRA)
[ https://issues.jboss.org/browse/CDI-87?page=com.atlassian.jira.plugin.sys... ]
Geoffrey De Smet commented on CDI-87:
-------------------------------------
Presume this embedding scenario:
Project A does not use weld or CDI directly. It depends on B and C.
Project B has CDI and weld use as optional: it does not use weld by default, but includes a beans.xml in it's classpath in case you want to take advantage of that
Project C uses CDI and weld. It doesn't depend on B. It knows nothing of B (so it wouldn't presume excluding it). It has no intention of being any influence on anything B related.
Result: Because C fires up weld, which as a side-effect fires up the beans.xml of B. That shouldn't happen.
> 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
13 years, 3 months