camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: Restlet component with OSGi/Blueprint
Date Thu, 27 Sep 2012 07:21:19 GMT
The reslet framework have a number of extensions. You may need to use
the servlet extension to hook into the servlet container

How to configure that, I guess you need to dig in a bit.

As we love contributions, feel free to help improve the docs. Or write
a little cookbook page etc.

On Wed, Sep 26, 2012 at 12:41 PM, Martin Stiborský
<> wrote:
> Hello,
> I'd like to ask you for few things, I'm still missing some basic
> points I guess, so maybe it will sound like trivial, sorry for that…
> I need to use the restlet with Apache Camel. I need to create REST API
> with Apache Camel to offer data and also I need to consume REST API,
> from outside applications.
> Problem is, that I'm not really sure how to use the Restlet component
> inside Camel, with OSGi&Blueprint.
> For example, where and how to configure the basic route, I mean, the
> REST API you can call on "/rest/...", or where is the port configured.
> Real example - I have a Camel bundle, there I have some basic route
> with using of Restlet component, see Java code:
> from("restlet:{something}")
>                         .process(new Processor() {
>                                 @Override
>                                 public void process(Exchange exchange) ..... skipped
> As you can see, the path to the REST call (and the server where is the
> app running) is hardcoded, that is not good…how to solve it? I know, I
> can create (somehow) some preference file and load the server
> path/rest api path it in the Java code and then use it, but is that
> the correct way? Anyway, my next question is more serious for me :)
> This route I've used above as example has own blueprint.xml of course,
> and there is a Camel context create for it, and there is a
> routeBuilder with reference to corresponding bean. And it works…But,
> when I have another bundle, with another Camel context, then I have to
> use another port for the restlet component, right? (Because of
> different Camel context?) And here I'm again on the wrong way I
> think…I don't know the best practices, yet, it's a little bit hard to
> start.
> Today, the "Camel in Action" book just arrived for me, I hope I'll
> fill the most critical knowledge gaps soon, but in the mean time,
> could you help me, guys?
> Thanks!
> --
> S pozdravem
> Martin Stiborský
> Jabber:

Claus Ibsen
Red Hat, Inc.
FuseSource is now part of Red Hat
Twitter: davsclaus
Author of Camel in Action:

View raw message