[cdi-dev] CDI.current() in AfterDeploymentValidation

Martin Kouba mkouba at redhat.com
Mon Apr 3 02:48:31 EDT 2017

Hi John,

I think it's valid to call CDI.current() from within an extension. WRT 
Weld - what version and environment do you use? There was an issue in 
Weld SE which should be fixed in 2.4.2 (see also WELD-2256 [1]).



Dne 3.4.2017 v 04:36 John Ament napsal(a):
> So I know during the reception of AfterDeploymentValidation, the
> container isn't fully bootstrapped.  However, its valid to look up
> beans.  I would therefore expect that CDI.current().select()... to work
> fine.  However, at least in Weld it doesn't.  This is because
> CDI.current() cannot figure out what container to use (it's not fully
> bootstrapped yet).  So my question - is this a Weld issue, or a spec
> clarification?
> John
> ------------------------------------------------------------------------
> 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.
> _______________________________________________
> cdi-dev mailing list
> 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.

Martin Kouba
Senior Software Engineer
Red Hat, Czech Republic

More information about the cdi-dev mailing list