camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From unixployd <zheka.p...@gmail.com>
Subject Re: Spring does not handle @Produce
Date Fri, 06 Aug 2010 06:21:30 GMT

The code that creates routing looks like:

from(fromUrl).process(new EmailProcessor());

Actual EmailProcessor:

public final class EmailProcessor implements Processor {

    private Log log = LogFactory.getLog(getClass());
       
    @Produce(uri="log:foo")
    protected ProducerTemplate producer; 

    public void process(Exchange exchange) throws Exception {
    	log.info("producer is " + producer);
   }

}

So then starting up, Spring would handle this and would create one singleton
of EmailProcessor in his context, if of course there would be defined bean
in applicationContext.xml.

Is it correct that this code should work and producer should not be null?


-- 
View this message in context: http://camel.465427.n5.nabble.com/Spring-does-not-handle-Produce-tp2264524p2266328.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message