camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Sicker <boa...@gmail.com>
Subject Re: Verify understanding...
Date Mon, 08 Aug 2016 16:10:57 GMT
When I last looked at the code, doing that creates a new BeanProducer that
caches the bean. I might be misremembering the class names, but I do
remember beans being cached when used by class reference.

On 7 August 2016 at 20:30, Brad Johnson <brad.johnson@mediadriver.com>
wrote:

> Just wanted to verify that my understanding is correct here.  Since I'm
> switching from XML to Java DSL I want to verify that when I do something
> like this in the configure() method:
>
> .filter().method(POValidator.class)
> .bean(POEnricher.class)
>
> It is only instantiating that once.  It isn't creating a new bean every
> time the route is invoked.  Since I'm used to injecting these from XML and
> not making static references to the classes like this I want to make sure
> these are the equivalent of a bean being instantiated in a Spring or
> Blueprint XML file and then injected into the the route in a <camelContext>
> and not a request scoped bean.
>
> Brad
>



-- 
Matt Sicker <boards@gmail.com>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message