Error Injecting endpoint into a bean in Camel -


i have bean defined annotation.i tried using camelbeanpostprocessor camelcontext null.

public class helloworld {    @endpointinject(uri="direct:copy")   private producertemplate template;     public final void speak(exchange e) {     template.sendbody("a new message");   }    public producertemplate gettemplate() {     return template;   }    public void settemplate(producertemplate template) {     this.template = template;   }  } 

there quite lot of ways of achieving this. bean processor, can implement processor , have access entire exchange, , of course camelcontext well:

public class helloworld implements processor {   public void process(exchange exchange) throws exception {     context = exchange.getcontext()   } } 

Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -