Hi Harald,
Please be aware the enable-implicit-cdi config setting turns off implicit scanning for all archives in the entire server. If you want to do it per archive, you can add a beans.xml with a bean-discovery-mode of none.
Hope this helps,
- Tom
On May 6, 2013, at 1:00 PM, Harald Wellmann <hwellmann.de_at_gmail.com> wrote:
> Digging in the sources, I found this new setting for domain.xml that seems to be doing the trick:
>
> <cdi-service enable-implicit-cdi="false"/>
>
> Best regards,
> Harald
>
>
> Am 05.05.2013 22:02, schrieb Harald Wellmann:
>> Does GlassFish 4.0 or Weld 2.0 offer an option to prevent an archive
>> from being scanned for managed beans?
>>
>> CDI 1.1 section 12.1 only states:
>>
>> "For compatibility with Contexts and Dependency 1.0, products must
>> contain an option to cause an archive to be ignored by the container
>> when no beans.xml is present."
>>
>> I'm having problems with a web app containing guava-14.0.jar in
>> WEB-INF/lib which has a class annotated with javax.inject.Singleton, so
>> it gets treated as an implicit bean archive, which causes an exception.
>>
>> Best regards,
>> Harald
>>
>>
>