users@glassfish.java.net

Re: [FishCAT] CDI 1.1: How to exclude an archive from scanning?

From: Harald Wellmann <hwellmann.de_at_gmail.com>
Date: Mon, 06 May 2013 19:00:18 +0200

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
>
>