title: Is it possible to use @Resource on a constructor?
body: <p>I was wondering if it possible to use the <code>@Resource</code> annotation on a constructor.</p>
  
  <p>My use case is that I want to wire a final field called <code>bar</code>.</p>
  
  <pre><code>public class Foo implements FooBar {
  
      private final Bar bar;
  
      @javax.annotation.Resource(name="myname")
      public Foo(Bar bar) {
          this.bar = bar;
      }
  }
  </code></pre>
  
  <p>I get a message that the <code>@Resource</code> is not allowed on this location. Is there any other way I could wire the final field?</p>