title: GlassFish, CDI and constructor injection
body: <p>Is constructor injection supported in GlassFish 3.1's implementation of CDI for managed beans? I have a <code>@Singleton</code> EJB into which I want to inject another managed bean (contained in the same EJB module) using constructor injection. Field injection does work. But with constructor injection I get a <code>NullPointerException</code> from <code>AbstractSingletonContainer</code>.</p>
  
  <p>This does work:</p>
  
  <pre><code>@Singleton
  public class FooBean implements Foo {
  
    @Inject private BarBean bar;
  
  }
  </code></pre>
  
  <p>This does not work:</p>
  
  <pre><code>@Singleton
  public class FooBean implements Foo {
  
      private final BarBean bar;
  
      @Inject
      public FooBean(BarBean bar) {
          this.bar = bar;
      }
  
  }
  </code></pre>