0 Replies Latest reply on Jul 17, 2014 4:37 AM by Ross Goldberg

    How to programmatically inject a CDI managed bean into a local variable in a static method

    Ross Goldberg Newbie

      How can I programmatically inject a CDI managed bean into a local variable in a static method?

       

      I'm currently using CDI 1.1 implemented by Weld 2.0.0 running in GlassFish 4.0.

       

      In a month or so, I will be moving to CDI 1.2 implemented by the then-current version of Weld (it's 2.2.3 at post time) running in Tomcat 7 or 8.

       

      Thanks.