You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by furchess123 <co...@hotmail.com> on 2015/07/01 17:04:31 UTC

Excluding prototype-scoped @Component route builder from ?

Hi,
I am using Camel 2.14.2.  All my RouteBuilder implementations are @Component
annotated Spring beans, auto-wired with processors, error handlers,
AggregationStrategy implementation beans, etc. I have been using
*contextScan* to load these Spring beans into Camel context. However, I have
one route builder implementation that is a prototype-scoped Spring bean,
distinct instances of which may have to be created on-demand at runtime. It
must NOT be component-scanned at startup.

Per Camel's  reference guide
<http://people.apache.org/~dkulp/camel/spring.html>  , I have tried to
exclude that particular class from being component-scanned by Camel using
the following:

<camelContext xmlns="http://camel.apache.org/schema/spring">
        <contextScan>
            *<excludes>
                com.myco.something.route.MyExcludedRouteBuilder
            </excludes>*
        </contextScan>
    </camelContext>

*This doesn't work.* Camel doesn't seem to ignore this route builder class
and tries to instantiate it at startup. I don't provide a no-arg constructor
for that class (instances are requested from the Spring context on demand
with a specific "from" endpoint value) so CamelContextFactoryBean throws the
following exception:

...
Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'MyExcludedRouteBuilder' defined in file
[.../route/MyExcludedRouteBuilder.class]: Instantiation of bean failed;
nested exception is org.springframework.beans.BeanInstantiationException:
Could not instantiate bean class
[com.myco.something.route.MyExcludedRouteBuilder]: No default constructor
found; nested exception is java.lang.NoSuchMethodException:
com.myco.something.route.MyExcludedRouteBuilder.<init>()
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1095)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1040)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:505)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:198)
	at
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:489)
	at
org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1060)
	at
org.apache.camel.spring.ContextScanRouteBuilderFinder.appendBuilders(ContextScanRouteBuilderFinder.java:49)
	at
org.apache.camel.spring.CamelContextFactoryBean.findRouteBuildersByContextScan(CamelContextFactoryBean.java:233)
	at
org.apache.camel.core.xml.AbstractCamelContextFactoryBean.findRouteBuilders(AbstractCamelContextFactoryBean.java:881)
	at
org.apache.camel.core.xml.AbstractCamelContextFactoryBean.setupRoutes(AbstractCamelContextFactoryBean.java:344)
	at
org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(*CamelContextFactoryBean.java:326*)
	... 56 more
Caused by: org.springframework.beans.BeanInstantiationException: Could not
instantiate bean class [com.myco.something.route.MyExcludedRouteBuilder]: No
default constructor found; nested exception is
java.lang.NoSuchMethodException:
com.myco.something.route.MyExcludedRouteBuilder.<init>()
	at
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:85)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1088)
	... 68 more
Caused by: java.lang.NoSuchMethodException:
com.myco.something.route.MyExcludedRouteBuilder.<init>()
	at java.lang.Class.getConstructor0(Class.java:2892)
	at java.lang.Class.getDeclaredConstructor(Class.java:2058)
	at
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:80)
	... 69 more


I cannot find an example of using /excludes/ with /contextScan/, other than
what I see here: 
http://camel.apache.org/spring.html

It states that I can use the same ANT-style patterns to exclude/include
classes as with /<packageScan>/. I have tried wild cards as well as
specifying the full class name explicitly (as shown in the example above.)
Nothing excludes the class during Camel's context scanning. Why? Am I doing
it incorrectly?  Or is it a bug?

Thanks for any help!



--
View this message in context: http://camel.465427.n5.nabble.com/Excluding-prototype-scoped-Component-route-builder-from-contextScan-tp5768755.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Excluding prototype-scoped @Component route builder from ?

Posted by furchess123 <co...@hotmail.com>.
Claus, thank you for your response. Removing spaces didn't help (and,
frankly, I'd be surprised if it did.) I did the following:

    <camelContext xmlns="http://camel.apache.org/schema/spring"> 
         <contextScan> 
            
<excludes>com.myco.something.route.MyExcludedRouteBuilder</excludes> 
         </contextScan> 
     </camelContext> 

Same error.



--
View this message in context: http://camel.465427.n5.nabble.com/Excluding-prototype-scoped-Component-route-builder-from-contextScan-tp5768755p5768770.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Excluding prototype-scoped @Component route builder from ?

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Try without line breaks in that <excludes> so there is no line breaks
/ spaces etc.

On Wed, Jul 1, 2015 at 5:04 PM, furchess123 <co...@hotmail.com> wrote:
> Hi,
> I am using Camel 2.14.2.  All my RouteBuilder implementations are @Component
> annotated Spring beans, auto-wired with processors, error handlers,
> AggregationStrategy implementation beans, etc. I have been using
> *contextScan* to load these Spring beans into Camel context. However, I have
> one route builder implementation that is a prototype-scoped Spring bean,
> distinct instances of which may have to be created on-demand at runtime. It
> must NOT be component-scanned at startup.
>
> Per Camel's  reference guide
> <http://people.apache.org/~dkulp/camel/spring.html>  , I have tried to
> exclude that particular class from being component-scanned by Camel using
> the following:
>
> <camelContext xmlns="http://camel.apache.org/schema/spring">
>         <contextScan>
>             *<excludes>
>                 com.myco.something.route.MyExcludedRouteBuilder
>             </excludes>*
>         </contextScan>
>     </camelContext>
>
> *This doesn't work.* Camel doesn't seem to ignore this route builder class
> and tries to instantiate it at startup. I don't provide a no-arg constructor
> for that class (instances are requested from the Spring context on demand
> with a specific "from" endpoint value) so CamelContextFactoryBean throws the
> following exception:
>
> ...
> Caused by: org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'MyExcludedRouteBuilder' defined in file
> [.../route/MyExcludedRouteBuilder.class]: Instantiation of bean failed;
> nested exception is org.springframework.beans.BeanInstantiationException:
> Could not instantiate bean class
> [com.myco.something.route.MyExcludedRouteBuilder]: No default constructor
> found; nested exception is java.lang.NoSuchMethodException:
> com.myco.something.route.MyExcludedRouteBuilder.<init>()
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1095)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1040)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:505)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:198)
>         at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:489)
>         at
> org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1060)
>         at
> org.apache.camel.spring.ContextScanRouteBuilderFinder.appendBuilders(ContextScanRouteBuilderFinder.java:49)
>         at
> org.apache.camel.spring.CamelContextFactoryBean.findRouteBuildersByContextScan(CamelContextFactoryBean.java:233)
>         at
> org.apache.camel.core.xml.AbstractCamelContextFactoryBean.findRouteBuilders(AbstractCamelContextFactoryBean.java:881)
>         at
> org.apache.camel.core.xml.AbstractCamelContextFactoryBean.setupRoutes(AbstractCamelContextFactoryBean.java:344)
>         at
> org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(*CamelContextFactoryBean.java:326*)
>         ... 56 more
> Caused by: org.springframework.beans.BeanInstantiationException: Could not
> instantiate bean class [com.myco.something.route.MyExcludedRouteBuilder]: No
> default constructor found; nested exception is
> java.lang.NoSuchMethodException:
> com.myco.something.route.MyExcludedRouteBuilder.<init>()
>         at
> org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:85)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1088)
>         ... 68 more
> Caused by: java.lang.NoSuchMethodException:
> com.myco.something.route.MyExcludedRouteBuilder.<init>()
>         at java.lang.Class.getConstructor0(Class.java:2892)
>         at java.lang.Class.getDeclaredConstructor(Class.java:2058)
>         at
> org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:80)
>         ... 69 more
>
>
> I cannot find an example of using /excludes/ with /contextScan/, other than
> what I see here:
> http://camel.apache.org/spring.html
>
> It states that I can use the same ANT-style patterns to exclude/include
> classes as with /<packageScan>/. I have tried wild cards as well as
> specifying the full class name explicitly (as shown in the example above.)
> Nothing excludes the class during Camel's context scanning. Why? Am I doing
> it incorrectly?  Or is it a bug?
>
> Thanks for any help!
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Excluding-prototype-scoped-Component-route-builder-from-contextScan-tp5768755.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Re: Excluding prototype-scoped @Component route builder from ?

Posted by furchess123 <co...@hotmail.com>.
OK, thanks for looking into this. In the meantime, I suppose I'd have to
remove @Component annotation from my route builders, define them in the
Spring XML file and then define the routeBuilders with the references to
them. That's inconsistent with the rest of my Spring components, but that
certainly solves the problem. 

If I am not mistaken, today Camel's /packageScan/ always instantiates any
RouteBuilder instances it finds in the specified packages, including those
annotated as Spring components. This results in such route builders
instantiated twice, which is wrong and should not be happening. Wouldn't it
be reasonable for Camel to recognize Spring-managed RouteBuilder
implementations and simply load those already instantiated by Spring
instances into Camel context - without trying to create an instance? 



--
View this message in context: http://camel.465427.n5.nabble.com/Excluding-prototype-scoped-Component-route-builder-from-contextScan-tp5768755p5768788.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Excluding prototype-scoped @Component route builder from ?

Posted by Claus Ibsen <cl...@gmail.com>.
I logged a ticket to improve this
https://issues.apache.org/jira/browse/CAMEL-8926

On Wed, Jul 1, 2015 at 8:43 PM, Claus Ibsen <cl...@gmail.com> wrote:
> Hi
>
> Ah its because Camel uses this to find the beans
>
> Map<String, RoutesBuilder> beans =
> applicationContext.getBeansOfType(RoutesBuilder.class, true, true);
>
> And I suspect it causes spring to try to auto wire and create the
> bean. Then thereafter the filtering is done, eg frankly we would need
> to know the class name before we can exclude it.
>
> On Wed, Jul 1, 2015 at 5:04 PM, furchess123 <co...@hotmail.com> wrote:
>> Hi,
>> I am using Camel 2.14.2.  All my RouteBuilder implementations are @Component
>> annotated Spring beans, auto-wired with processors, error handlers,
>> AggregationStrategy implementation beans, etc. I have been using
>> *contextScan* to load these Spring beans into Camel context. However, I have
>> one route builder implementation that is a prototype-scoped Spring bean,
>> distinct instances of which may have to be created on-demand at runtime. It
>> must NOT be component-scanned at startup.
>>
>> Per Camel's  reference guide
>> <http://people.apache.org/~dkulp/camel/spring.html>  , I have tried to
>> exclude that particular class from being component-scanned by Camel using
>> the following:
>>
>> <camelContext xmlns="http://camel.apache.org/schema/spring">
>>         <contextScan>
>>             *<excludes>
>>                 com.myco.something.route.MyExcludedRouteBuilder
>>             </excludes>*
>>         </contextScan>
>>     </camelContext>
>>
>> *This doesn't work.* Camel doesn't seem to ignore this route builder class
>> and tries to instantiate it at startup. I don't provide a no-arg constructor
>> for that class (instances are requested from the Spring context on demand
>> with a specific "from" endpoint value) so CamelContextFactoryBean throws the
>> following exception:
>>
>> ...
>> Caused by: org.springframework.beans.factory.BeanCreationException: Error
>> creating bean with name 'MyExcludedRouteBuilder' defined in file
>> [.../route/MyExcludedRouteBuilder.class]: Instantiation of bean failed;
>> nested exception is org.springframework.beans.BeanInstantiationException:
>> Could not instantiate bean class
>> [com.myco.something.route.MyExcludedRouteBuilder]: No default constructor
>> found; nested exception is java.lang.NoSuchMethodException:
>> com.myco.something.route.MyExcludedRouteBuilder.<init>()
>>         at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1095)
>>         at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1040)
>>         at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:505)
>>         at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
>>         at
>> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321)
>>         at
>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:198)
>>         at
>> org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:489)
>>         at
>> org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1060)
>>         at
>> org.apache.camel.spring.ContextScanRouteBuilderFinder.appendBuilders(ContextScanRouteBuilderFinder.java:49)
>>         at
>> org.apache.camel.spring.CamelContextFactoryBean.findRouteBuildersByContextScan(CamelContextFactoryBean.java:233)
>>         at
>> org.apache.camel.core.xml.AbstractCamelContextFactoryBean.findRouteBuilders(AbstractCamelContextFactoryBean.java:881)
>>         at
>> org.apache.camel.core.xml.AbstractCamelContextFactoryBean.setupRoutes(AbstractCamelContextFactoryBean.java:344)
>>         at
>> org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(*CamelContextFactoryBean.java:326*)
>>         ... 56 more
>> Caused by: org.springframework.beans.BeanInstantiationException: Could not
>> instantiate bean class [com.myco.something.route.MyExcludedRouteBuilder]: No
>> default constructor found; nested exception is
>> java.lang.NoSuchMethodException:
>> com.myco.something.route.MyExcludedRouteBuilder.<init>()
>>         at
>> org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:85)
>>         at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1088)
>>         ... 68 more
>> Caused by: java.lang.NoSuchMethodException:
>> com.myco.something.route.MyExcludedRouteBuilder.<init>()
>>         at java.lang.Class.getConstructor0(Class.java:2892)
>>         at java.lang.Class.getDeclaredConstructor(Class.java:2058)
>>         at
>> org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:80)
>>         ... 69 more
>>
>>
>> I cannot find an example of using /excludes/ with /contextScan/, other than
>> what I see here:
>> http://camel.apache.org/spring.html
>>
>> It states that I can use the same ANT-style patterns to exclude/include
>> classes as with /<packageScan>/. I have tried wild cards as well as
>> specifying the full class name explicitly (as shown in the example above.)
>> Nothing excludes the class during Camel's context scanning. Why? Am I doing
>> it incorrectly?  Or is it a bug?
>>
>> Thanks for any help!
>>
>>
>>
>> --
>> View this message in context: http://camel.465427.n5.nabble.com/Excluding-prototype-scoped-Component-route-builder-from-contextScan-tp5768755.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> Email: cibsen@redhat.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
> hawtio: http://hawt.io/
> fabric8: http://fabric8.io/



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Re: Excluding prototype-scoped @Component route builder from ?

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Ah its because Camel uses this to find the beans

Map<String, RoutesBuilder> beans =
applicationContext.getBeansOfType(RoutesBuilder.class, true, true);

And I suspect it causes spring to try to auto wire and create the
bean. Then thereafter the filtering is done, eg frankly we would need
to know the class name before we can exclude it.

On Wed, Jul 1, 2015 at 5:04 PM, furchess123 <co...@hotmail.com> wrote:
> Hi,
> I am using Camel 2.14.2.  All my RouteBuilder implementations are @Component
> annotated Spring beans, auto-wired with processors, error handlers,
> AggregationStrategy implementation beans, etc. I have been using
> *contextScan* to load these Spring beans into Camel context. However, I have
> one route builder implementation that is a prototype-scoped Spring bean,
> distinct instances of which may have to be created on-demand at runtime. It
> must NOT be component-scanned at startup.
>
> Per Camel's  reference guide
> <http://people.apache.org/~dkulp/camel/spring.html>  , I have tried to
> exclude that particular class from being component-scanned by Camel using
> the following:
>
> <camelContext xmlns="http://camel.apache.org/schema/spring">
>         <contextScan>
>             *<excludes>
>                 com.myco.something.route.MyExcludedRouteBuilder
>             </excludes>*
>         </contextScan>
>     </camelContext>
>
> *This doesn't work.* Camel doesn't seem to ignore this route builder class
> and tries to instantiate it at startup. I don't provide a no-arg constructor
> for that class (instances are requested from the Spring context on demand
> with a specific "from" endpoint value) so CamelContextFactoryBean throws the
> following exception:
>
> ...
> Caused by: org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'MyExcludedRouteBuilder' defined in file
> [.../route/MyExcludedRouteBuilder.class]: Instantiation of bean failed;
> nested exception is org.springframework.beans.BeanInstantiationException:
> Could not instantiate bean class
> [com.myco.something.route.MyExcludedRouteBuilder]: No default constructor
> found; nested exception is java.lang.NoSuchMethodException:
> com.myco.something.route.MyExcludedRouteBuilder.<init>()
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1095)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1040)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:505)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:198)
>         at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:489)
>         at
> org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1060)
>         at
> org.apache.camel.spring.ContextScanRouteBuilderFinder.appendBuilders(ContextScanRouteBuilderFinder.java:49)
>         at
> org.apache.camel.spring.CamelContextFactoryBean.findRouteBuildersByContextScan(CamelContextFactoryBean.java:233)
>         at
> org.apache.camel.core.xml.AbstractCamelContextFactoryBean.findRouteBuilders(AbstractCamelContextFactoryBean.java:881)
>         at
> org.apache.camel.core.xml.AbstractCamelContextFactoryBean.setupRoutes(AbstractCamelContextFactoryBean.java:344)
>         at
> org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(*CamelContextFactoryBean.java:326*)
>         ... 56 more
> Caused by: org.springframework.beans.BeanInstantiationException: Could not
> instantiate bean class [com.myco.something.route.MyExcludedRouteBuilder]: No
> default constructor found; nested exception is
> java.lang.NoSuchMethodException:
> com.myco.something.route.MyExcludedRouteBuilder.<init>()
>         at
> org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:85)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1088)
>         ... 68 more
> Caused by: java.lang.NoSuchMethodException:
> com.myco.something.route.MyExcludedRouteBuilder.<init>()
>         at java.lang.Class.getConstructor0(Class.java:2892)
>         at java.lang.Class.getDeclaredConstructor(Class.java:2058)
>         at
> org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:80)
>         ... 69 more
>
>
> I cannot find an example of using /excludes/ with /contextScan/, other than
> what I see here:
> http://camel.apache.org/spring.html
>
> It states that I can use the same ANT-style patterns to exclude/include
> classes as with /<packageScan>/. I have tried wild cards as well as
> specifying the full class name explicitly (as shown in the example above.)
> Nothing excludes the class during Camel's context scanning. Why? Am I doing
> it incorrectly?  Or is it a bug?
>
> Thanks for any help!
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Excluding-prototype-scoped-Component-route-builder-from-contextScan-tp5768755.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/