title: camel-file component filter with cdi
body: <p>I'm using camel without the Spring framework (using CDI instead).
  How can I set a filter for the camel-file component?</p>
  
  <p>My filter class looks like this:</p>
  
  <pre><code>@Named
  @Stateless
  public class MyFilter&lt;T&gt; implements GenericFileFilter&lt;T&gt; {
     System.out.println("MyFilter was triggered");
    .......
  </code></pre>
  
  <p>So I tried this:</p>
  
  <pre><code>&lt;route&gt;
     &lt;from uri="file://somewhere?filter=#myFilter"/&gt;
     &lt;to uri="...."/&gt;
   &lt;/route&gt;
  </code></pre>
  
  <p>But I'm getting:</p>
  
  <pre><code>java.lang.IllegalArgumentException: Could not find a suitable setter for
  property: filter as there isn't a setter method with same type: 
  java.lang.String nor type conversion possible: No type converter 
  available to convert from type: java.lang.String to the required type:
  org.apache.camel.component.file.GenericFileFilter with value #myFilter
  </code></pre>
  
  <p>What am I missing?</p>
  
  <p><strong>Update:</strong></p>
  
  <p>Please note that the bean is registered. If I use:</p>
  
  <pre><code>&lt;to uri="ejb:java:global/Abc/MyFilter?method=accept"/&gt;
  </code></pre>
  
  <p>then <code>MyFilter was triggered</code> is showing up in the log.</p>
  
  <p>So the problem is about configuring the file component filter.</p>