users@glassfish.java.net

Re: GF4 complains about CDI failures, but I do not use CDI ...

From: Romain Grecourt <romain.grecourt_at_oracle.com>
Date: Mon, 30 Sep 2013 04:43:29 +0200

On 9/29/13 10:04 AM, forums_at_java.net wrote:
> So do I understand correctly: GF4 has CDI enabled by default, even for
> EAR
> not containing a beans.xml file? Is that a new Java EE 7 feature, or
> just a
> GF4 trick?
See the following quote from https://java.net/jira/browse/GLASSFISH-20579

/If you were to add a beans.xml, with the cited exclude config, to the
guava jar, then you should see the behavior you're expecting.//
//Assuming that you don't want to modify the guava archive, I think
you'll find the following asadmin deployment property to be useful://
//--property implicitCdiEnabled=false//
//(Example: *asadmin deploy --property implicitCdiEnabled=false
<archive>*)//
//*This property will force the CDI 1.0 behavior wrt implicit bean
discovery* for the archive being deployed, rather than the
aforementioned server-wide configuration./

Thanks,
Romain
>
> --
>
> [Message sent by forum member 'mkarg']
>
> View Post: http://forums.java.net/node/898688
>
>