Hi Rodrigo,
There is not magic (ok, maybe just a tiny bit). Try something like
this:
CamelContext camel = new DefaultCamelContext();
// lets add some routes
container.addRoutes(new RouteBuilder() {
public void configure() {
from("direct:start").process(new Processor() {
public void process(Exchange e) {
// whatever you want in here
}
});
}
});
camel.start();
You don't necessarily need spring, but it's a handy way to wire route
components. There are plenty of protocols and integration patterns we
support, please change the "direct:start" endpoint and the content of
the route at will.
Cheers
Hadrian
On Mar 2, 2009, at 10:15 PM, Rodrigo Valerio wrote:
I try to integrate camel into my app, but without success.
Using spring integration, if i run by Main class (like examples),
all run`s
ok.
How i get a CamelContext or Template instance in my app class?
I see al the documentation, but can`t solve this simple (i think)
problem:
How is the best way to do this.
My webapp class, isn`t instantiated by spring and i don`t any
expertise with
spring too.
Thanks in advance.
--
View this message in context:
http://www.nabble.com/Camel-with-my-app-tp22301780p22301780.html
Sent from the Camel - Users mailing list archive at Nabble.com.