title: org.jboss.weld.exceptions.UnsatisfiedResolutionException WELD-001334 Unsatisfied dependencies for type MyInterface with qualifiers @Any @MyAnnotation
body: <p>I have a Java 8 project and a JBoss 7.1.0GA server.
  I have a batch class with a global variable</p>
  
  <pre><code>@EJB
  public MyInterface delegate;
  </code></pre>
  
  <p>which is defined as an instance of DelegateClass in my ejb-jar.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;ejb-jar xmlns="http://java.sun.com/xml/ns/javaee" version="3.1"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd"&gt;
      &lt;module-name&gt;moduleName&lt;/module-name&gt;
  &lt;enterprise-beans&gt;
      &lt;session&gt;
          &lt;ejb-name&gt;ejbName&lt;/ejb-name&gt;
          &lt;business-remote&gt;MyInterface&lt;/business-remote&gt;
          &lt;ejb-class&gt;DelegateClass&lt;/ejb-class&gt;
          &lt;session-type&gt;Stateless&lt;/session-type&gt;
      &lt;/session&gt;
  &lt;/enterprise-beans&gt;
  </code></pre>
  
  <p></p>
  
  <p>I have some implementations of MyInterface, so in my class DelegateClass I want to wrap an implementation of MyInterface and set it by an enum constant. 
  Here the code:</p>
  
  <pre><code>@Stateless
  @LocalBean
  @TransactionAttribute(TransactionAttributeType.REQUIRED)
  public class DelegateClass implements MyInterface {
  
  @Inject
  @Any
  protected Instance&lt;MyInterface&gt; instance;
  
  protected MyInterface selectedImpl;
  
  @PostConstruct
  public void init() {
      selectedImpl = instance.select(MyLiteralAnnotation.create(MyEnum.value)).get();
  }
  </code></pre>
  
  <p>Here is the code of my literal annotation class:</p>
  
  <pre><code>public class MyLiteralAnnotation extends AnnotationLiteral&lt;MyAnnotation&gt; implements MyAnnotation {
  
  private final MyEnum value;
  
  private MyLiteralAnnotation(MyEnum value) {
      this.value = value;
  }
  
  @Override
  public MyEnum getValue() {
      return value;
  }
  
  public static MyLiteralAnnotation create(MyEnum value) {
      return new MyLiteralAnnotation(value);
  }
  </code></pre>
  
  <p>}</p>
  
  <p>the annotation I created:</p>
  
  <pre><code>@Retention(RetentionPolicy.RUNTIME)
  
  @Target({ TYPE, METHOD, FIELD, PARAMETER, CONSTRUCTOR }) 
  @Qualifier 
  public @interface MyAnnotation {
  
  MyEnum getValue();
  }
  </code></pre>
  
  <p>and the implementation I want to have from the instance.select(...)</p>
  
  <pre><code>@Stateless
  @LocalBean
  @TransactionAttribute(TransactionAttributeType.REQUIRED)
  @MyAnnotation(MyEnum.value)
  public class MyInterfaceImpl implements MyInterface {
  ....
  }
  </code></pre>
  
  <p>I debug the application on my server, but when I try to instantiate the selectImpl field with instance.select(...), I have the exception:</p>
  
  <blockquote>
    <p>org.jboss.weld.exceptions.UnsatisfiedResolutionException WELD-001334 Unsatisfied dependencies for type MyInterface with qualifiers @Any @MyAnnotation</p>
  </blockquote>
  
  <p>Can someone help me, please ?</p>