aspose file tools*
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


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Camel in web apps " Watch "Camel in web apps " New topic
Author

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
author
Greenhorn

Joined: Apr 01, 2004
Posts: 18
Camel supports both synchronous and asynchronous messaging.
http://camel.apache.org/asynchronous-routing-engine.html

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: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus
andrew ennamorato
Ranch Hand

Joined: Oct 03, 2007
Posts: 100
Claus,

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.
 
 
subject: Camel in web apps