[cdi-dev] CDI SE and synthetic bean archives
mkouba at redhat.com
Thu May 26 03:20:51 EDT 2016
few notes WRT discussion about CDI SE and synthetic bean archives (EG
* Weld SE does not scan JDK classes
** by default, only jars/dirs with beans.xml are considered
** if org.jboss.weld.se.scan.classpath.entries set to true, Weld SE
scans the class path entries and implicit bean archives which don't
contain a beans.xml file are also supported; but rt.jar and friends are
not listed in the "java.class.path" system property
** AFAIK there is no other way how to implement this in a better way
Synthetic bean archive was originally intended as a feature for power
users who either know all the beans beforehand (possibly with discovery
disabled) or want to add some extra beans (if discovery is enabled).
That's the reason why it behaves as it has bean discorey mode "all". If
I understand John's concerns, it's all about the case of adding packages
(which itself is problematic because of java limitations).
If so, we could introduce something like
Filter<ArchivePath>, Package...). And provide some default "Filter"
More information about the cdi-dev