[
https://issues.apache.org/jira/browse/OWB-239?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gurkan Erdogdu closed OWB-239.
------------------------------
Resolution: Invalid
This is true action. @Named is a qualifier. You have to give it a @Named(value)
in producer method. So you have to define producer method as
@Produces
@Named("products")
public String getProducts()
{
return "Sucess from getProducts";
}
@Named value does not get producer method name automatically.
Also using @Named with string members are not recommended usage. See
specification 3.11. The qualifier @Named at injection points
> JavaBeans property getter naming convention with Producer Methods gives
> UnsatisfiedResolutionException
> ------------------------------------------------------------------------------------------------------
>
> Key: OWB-239
> URL: https://issues.apache.org/jira/browse/OWB-239
> Project: OpenWebBeans
> Issue Type: Bug
> Components: Injection and Lookup
> Affects Versions: M3
> Environment: Windows, Eclipse running Jetty
> Reporter: Bill Wigger
> Assignee: Gurkan Erdogdu
> Fix For: M3
>
>
> Problem:
> JavaBeans property getter naming convention with Producer Methods gives
> UnsatisfiedResolutionException
> Injection in class X:
> @Produces @Named public String getProducts() {
> return "Sucess from getProducts";
> }
> Injection Point in Y:
> public @Inject @Named("products") String N3;
> public String getTestNamed3() {
> String y = N3;
> return y;
> }
> Actual Results when getTestNamed3 is called from a JSP:
> javax.enterprise.inject.UnsatisfiedResolutionException: Api type
> [java.lang.String] is not found with the qualifiers
> [[email protected](value=products)]
> at
> org.apache.webbeans.container.ResolutionUtil.checkResolvedBeans(ResolutionUtil.java:93)
> at
> org.apache.webbeans.container.InjectionResolver.getInjectionPointBean(InjectionResolver.java:232)
> at
> org.apache.webbeans.inject.AbstractInjectable.inject(AbstractInjectable.java:90)
> etc....
>
> Desired Results:
> "Sucess from getProducts"
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.