Hi,
I can't send a message to the broker from a POJO and i don't know why... can anyone help me please?
I have the Camel Context:
In class CamelRoutes i have:
public void configure() throws Exception {
from("activemq:QueueIn").
to("bean:beanCamelService?method=testeCamel");
}
Bean 'beanCamelService':
@Produce(uri = "activemq:QueueOut")
protected IBusinessService businessService;
public CamelService() {
super();
}
public void setBusinessService(IBusinessService businessService) {
this.businessService = businessService;
}
public void testeCamel(Exchange e) {
businessService.doSomething(e.getIn().getBody());
}
I have @InOnly in BusinessService interface...
When i send a message to QueueIn everything is processed, but nothing is sent to QueueOut...
I'm using Servicemix 4.3 and Camel 2.4.0-fuse-00-00
Regards,
Pedro Araujo
Edited by: pedroprodigy on Sep 7, 2010 4:56 PM
Write an unit test and ensure it works there. Then you know it works before deploying in the container.
And I assume you have define the bean beanCamelService as a id. To help Spring with the ordering and IoC stuff.