Unsatisfied dependencies for type CamelContextBean with qualifiers @Default when start camel routes in jar and inject camelContextbean in same jar
<p>I have start routes in startup class and create a new CamelContextBean class because of This is a CDI injectable bean that will hold a reference to a CamelContext instance.</p>

<ul>
<li>java 1.8</li>
<li>apache camel 2.16.2</li>
<li>wildfly 9.0.2</li>
<li>ejb 3</li>
</ul>

<p>CamelContextBean :</p>

<pre><code>public class CamelContextBean {

   private CamelContext camelContext;

   public CamelContext getCamelContext() {
      return camelContext;
   }

   public void setCamelContext(CamelContext camelContext) {
      this.camelContext = camelContext;
   }
}
</code></pre>

<p>Startup class:</p>

<pre><code>@Singleton
@Startup
public class BootStrap {
      private static CamelContext camelContext;
      private CamelContextBean camelContextBean = new CamelContextBean();

     @PostConstruct
     public void init() throws Exception {
        camelContext = new DefaultCamelContext(); 

        try {
            camelContext.addRoutes(new MyRoute1());     
            camelContext.addRoutes(new MyRoute2());

            camelContext.start();
            camelContextBean.setCamelContext(camelContext);
        } catch (Exception e) {
              e.printStackTrace();
        }

     @Produces
     public CamelContextBean getCamelContextService() {
         return camelContextService;
     }
</code></pre>

<p>I want to use the camelContextBean in same jar by inject it.</p>

<pre><code>@Stateless
public class TestService {    
   @Inject
   CamelContextBean camelContextService;

   public void connectRoute(){
       CamelContext camelContext = camelContextService.getCamelContext();
       ...
       ...
   }
</code></pre>

<p>I installed this jar in maven repository. Try to use as dependency in war project and use this TestService as a ejb service. </p>

<pre><code>@EJB
TestService testService
</code></pre>

<p>When build the war project that all the routes are started. But cannot complete the build, it given Failed to start TestService because of that error in title.Can I have a solution for this problem? </p>