I'm slightly confused... See CDI Spec 1.0, section 3.3.8:
"The default name for a producer method is the method name, unless the method follows the JavaBeans property getter naming convention, in which case the default name is the JavaBeans property name." In my case, the producer method is called "foo()", which is not a getter, so the bean name should be "foo". (And this is what I get with Weld.) What is the default name generated by OWB in this case? Best regards, Harald 2012/11/12 John D. Ament <[email protected]>: > That is expected behavior. @Named uses javabean naming conventions to pick > the default name. > > On Nov 12, 2012 5:05 AM, "Harald Wellmann" <[email protected]> wrote: >> >> I have a producer method >> >> @Produces @Named >> public String foo() { ... } >> >> and a matching injection point >> >> @Inject @Named("foo") >> private String foo; >> >> in some other bean. >> >> With OWB 1.1.6, injection fails, unless @Named("foo") is explicitly >> added to the producer method. Is this a known issue? >> >> Best regards, >> Harald
