I'm a bit confused.  When you do disableDiscovery() does that leave discovery on for other archives in the classpath?





From: Laird Nelson <ljnelson@gmail.com>
Sent: Wednesday, March 22, 2017 11:51 AM
To: Martin Kouba; John Ament; cdi-dev
Subject: Re: [cdi-dev] Bean discovery question
 
On Wed, Mar 22, 2017 at 4:17 AM Martin Kouba <mkouba@redhat.com> wrote:
> That project's META-INF/beans.xml has bean discovery set to none
> (https://github.com/ljnelson/microbean-main/blob/master/src/main/resources/META-INF/beans.xml#L7),
> since there are no beans in that bean archive (it houses only the main
> class).  John indicated that this was likely the source of the problem:

I don't think this is the problem. In Weld SE bean archive isolation is
enabled by default. Ie. for
https://github.com/ljnelson/microbean-maven-cdi/blob/master/src/main/java/org/microbean/maven/cdi/MavenExtension.java
the beans.xml is
https://github.com/ljnelson/microbean-maven-cdi/blob/master/src/main/resources/META-INF/beans.xml

Good; that confirms what I expected.
 
> Perhaps I have misunderstood bean discovery: I thought that the
> discovery mode applied to the bean archive in question alone, not to an
> aggregate.

What do you mean with "aggregate"? Bean discovery mode is applied to a
specific bean archive only.

What I meant was: if I had misunderstood bean discovery, which I have not, then perhaps something about that bean archive's "none" mode was affecting other bean archives.  But I did not misunderstand bean discovery, so this is moot.

Best,
Laird

NOTICE: This e-mail message and any attachments may contain confidential, proprietary, and/or privileged information which should be treated accordingly. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this message, and destroy all physical and electronic copies. Thank you.