Matthew Broadhead
2017-11-27 09:00:26 UTC
If I include a jar in several webapps and the jar contains some
@ApplicationScoped beans it seems to work fine. i.e. those
@ApplicationScoped beans can be injected into the beans in the webapps
without conflict.
However if I use @Produces, e.g
@Produces
@MyQualifier
@RequestScoped
public MyCustomObject token() {
return createMyCutomObject();
}
Then i get org.apache.openejb.cdi.OpenEJBLifecycle.startApplication CDI
Beans module deployment failed
org.apache.webbeans.exception.WebBeansDeploymentException:
javax.enterprise.inject.AmbiguousResolutionException: There is more than
one Bean with type com.example.MyCustomObject
Is there a conflict between the various webapps?
@ApplicationScoped beans it seems to work fine. i.e. those
@ApplicationScoped beans can be injected into the beans in the webapps
without conflict.
However if I use @Produces, e.g
@Produces
@MyQualifier
@RequestScoped
public MyCustomObject token() {
return createMyCutomObject();
}
Then i get org.apache.openejb.cdi.OpenEJBLifecycle.startApplication CDI
Beans module deployment failed
org.apache.webbeans.exception.WebBeansDeploymentException:
javax.enterprise.inject.AmbiguousResolutionException: There is more than
one Bean with type com.example.MyCustomObject
Is there a conflict between the various webapps?