I just can't use properly routes. Can anyone give me a hint what I am missing? I am using example of standalone apache camel
application:
Main:
public class TestMain {
private Main main;
public static void main(String[] args) throws Exception {
TestMain service = new TestMain();
service.boot();
}
public void boot() throws Exception {
main = new Main();
TestRoute rt = new TestRoute();
main.enableHangupSupport();
main.bind("test", "testMethod");
main.addRouteBuilder(rt);
System.out.println("Starting camel");
main.run();
}
}
TestRoute:
from("timer:test")
.wireTap("bean:test?method=testMethod()")
.beanRef("test");
And Test:
public class Test {
public void testMethod(){
System.out.println("testMethod called");
}
}
What I am trying to achive is that, when someone put a message in proper route
application is sending a response, and in exact same moment, is caling testMethod
in order to process asynchronusly the request.
Aucun commentaire:
Enregistrer un commentaire