File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other Application Frameworks and the fly likes Camel in web apps Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Camel in web apps " Watch "Camel in web apps " New topic

Camel in web apps

andrew ennamorato
Ranch Hand

Joined: Oct 03, 2007
Posts: 100
Camel seems like a great fit for RESTful web apps/apis. The ability to take a request, hand it off, then provide status later ("did my request make it thru the backend processing yet?") is something. I've found a little hard to do in Mule, however.

How does Camel handle something like that - a sync (or async) routing thru a few transformations or services, yet still replying or responding via the initial HTTP entry point?

In general, how much coverage of Camel & web apps (in wars, with Jetty, etc) does the book provide?
Claus Ibsen

Joined: Apr 01, 2004
Posts: 18
Camel supports both synchronous and asynchronous messaging.

For example the Camel Jetty component will leverage the continuations feature from Jetty to be able to deliver back a response on the initial HTTP entry point.
Chapter 10 in the Camel book explains this is much more details and has an example it covers to go along.

The CXF-RS and Restlet component is planned to support this as well, when we upgrade to CXF 2.3 and Restlet 2.0 in those components.

Chapter 13 covers 4 scenarios for deploying Camel in
- standalone
- web application in Apache Tomcat as example server (Spring is covered as well)
- J2EE with JBoss as example server
- OSGi with Apache Karaf as example server

But we try not to limit deployment with Camel. So you can deploy Camel in any container you like whether its IBM WebSphere, WebLogic, Glassfish, Google App Engine, Java WebStart etc., Apache ServiceMix 3.x / 4.x, etc.

Claus Ibsen
Apache Camel Committer

Author of Camel in Action:
Open Source Integration:
andrew ennamorato
Ranch Hand

Joined: Oct 03, 2007
Posts: 100

Sounds great. Will try and pick up the book soon - we have plenty of uses for something like Camel and this will be a great way to start.
I agree. Here's the link:
subject: Camel in web apps
It's not a secret anymore!