This content has been marked as final.
Show 1 reply
-
1. Re: How to solve Ambiguous dependencies in CDI?
mkouba May 28, 2013 9:58 AM (in response to rmutha)Hi Roshan,
this is expected. You have a managed bean IUserHolder (a top-level Java class) and producer method for the same bean type and qualifiers (SecurityManager.getUserHolder()). There are several ways to solve this. One of which is to "disable" the managed bean with @Vetoed annotation. Read the spec and Weld docs to find the solution most suitable for your needs
See also:
http://docs.jboss.org/cdi/spec/1.1/cdi-spec.html#what_classes_are_beans
http://docs.jboss.org/cdi/spec/1.1/cdi-spec.html#unsatisfied_and_ambig_dependencies