[cdi-dev] Bean Discovery Mode in SE

Jozef Hartinger jharting at redhat.com
Wed Mar 4 07:45:25 EST 2015


Weld SE only supports bean archives with beans.xml (all 
bean-discovery-modes are supported in such an archive). Therefore, it 
will only scan locations marked explicitly with beans.xml files, not the 
entire classpath.

On 03/04/2015 12:42 PM, John D. Ament wrote:
> Jozef,
>
> How does Weld SE deal with it right now? I run two components, one 
> using WildFly 8.2 and the other just SE mode w/ Weld SE.  I don't 
> notice much of a difference in scanning, even though the SE one needs 
> to scan 50 mb of classpath.
>
> John
>
> On Wed, Mar 4, 2015 at 4:14 AM Jozef Hartinger <jharting at redhat.com 
> <mailto:jharting at redhat.com>> wrote:
>
>     For EE assuming bean-discovery-mode="annotated" by default if no
>     beans.xml is found is OK as the scope of scanning is limited by
>     the deployment. In SE however this would require that we scan the
>     entire classpath for scope annotations, stereotypes, etc. I am
>     therefore concerned about the performance implications of this.
>
>
>     On 03/01/2015 04:18 PM, John D. Ament wrote:
>>     Yeah actually you're right.  For some reason I had in my head
>>     that "all" was the default. It's very clearly not.  Too early for
>>     some of this :-)
>>
>>     So let me rephrase.  "annotated" will be the default bean
>>     discovery mode if a classpath entry contains no
>>     META-INF/beans.xml, based on the exact same rules used in EE.
>>
>>     Any concerns with that?
>>
>>     John
>>
>>     On Sun, Mar 1, 2015 at 10:10 AM Romain Manni-Bucau
>>     <rmannibucau at gmail.com <mailto:rmannibucau at gmail.com>> wrote:
>>
>>         For me it is 100% the same as ee where you have the same
>>         issues so keeping them aligned is better IMO. That said
>>         configuring globally the scanning would be nice.
>>
>>         Le 1 mars 2015 15:54, "John D. Ament" <john.d.ament at gmail.com
>>         <mailto:john.d.ament at gmail.com>> a écrit :
>>
>>             All,
>>
>>             I'd like to propose in my doc changes for CDI-26 that if
>>             a classpath entry does not contain a META-INF/beans.xml
>>             that it is treated as if it were
>>             bean-discovery-mode=none, e.g. no beans will be scanned
>>             in that entry. (BTW, I'm using classpath entry rather
>>             than archive in the document to account for cases where
>>             someone does -cp "./classes:./extra-classes:./lib/*" to
>>             define their classpath)
>>
>>             It's a bit different than how EE works, but I could
>>             imagine it causing fewer headaches when running on SE
>>             classpaths.
>>
>>             Any thoughts/comments?
>>
>>             John
>>
>>             _______________________________________________
>>             cdi-dev mailing list
>>             cdi-dev at lists.jboss.org <mailto:cdi-dev at lists.jboss.org>
>>             https://lists.jboss.org/mailman/listinfo/cdi-dev
>>
>>             Note that for all code provided on this list, the
>>             provider licenses the code under the Apache License,
>>             Version 2
>>             (http://www.apache.org/licenses/LICENSE-2.0.html). For
>>             all other ideas provided on this list, the provider
>>             waives all patent and other intellectual property rights
>>             inherent in such information.
>>
>>
>>
>>     _______________________________________________
>>     cdi-dev mailing list
>>     cdi-dev at lists.jboss.org  <mailto:cdi-dev at lists.jboss.org>
>>     https://lists.jboss.org/mailman/listinfo/cdi-dev
>>
>>     Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (http://www.apache.org/licenses/LICENSE-2.0.html). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/cdi-dev/attachments/20150304/b30226e4/attachment.html 


More information about the cdi-dev mailing list