0
votes

I have created a java-archetype project for Camel. It is a simple REST hello world to receive a get request and return a string body. When I run this as Java application from Eclipse it works as intended.

When I take the jar and deploy it the Fuse "deploy" folder I can see in the logs that the bundle has started. The state is active and green. However the Camel tab does not appear.

The same works if I use blueprint but does not seem to do so using the java dsl. Is there an extra magic code you need to add for Fuse to pick up the camel context? Thanks

1

1 Answers

2
votes

Yes for OSGi to startup you can use a spring or blueprint with a <camelContext> that starts Camel. If you use pure Java code you have to fight with OSGi and use an OSGI activator and setup all kind of OSGi stuff that gets you tiresome.

So add a blueprint xml file and add the <camelContext> and then you can refer to Java route builders, just as you can when doing spring xml: http://camel.apache.org/spring.html