camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Strachan <>
Subject Re: jsf and apache camel
Date Tue, 23 Jul 2013 10:09:42 GMT
On 22 July 2013 11:26, lassesvestergaard <> wrote:
> Thank you very much James.
> I ended up using JSF. I found out how to integrate Camel into a JSF
> application. I'm not sure it's the best way, but it seems to work (please
> enlighten me if you know a better solution).

angularjs is a much better solution for building great HTML5 web apps;
but thats maybe an answer to a different question than you asked ;)

> What I did is making a new
> managed bean (in JSF 2.0), that is application scoped, and through it's
> constructor starting a camelcontext. This way I can access the full Camel
> application in the web layer, and the camelcontext exists as long as the
> webserver is not shut down.
> The reason why I want to be able to create anonymous processors on-the-fly,
> is that I want users to be able to create custom routes from the web
> interface.

You can create custom routes on the fly using JMX, jolokia, REST or
Java just fine without using anonymous processors.

> I think anonymous processors are relevant because data formats
> can be more or less arbitrary, and therefore needs to be handled uniquely
> per route definition. I will definitely look into the build-in type
> converter and bean integration though.

I think you're confusing anonymous processors with DI beans. A data
format is mostly just a bean which needs to be registered in some
registry (JNDI, spring, guice, whatever). Those are outside of the
camel DSL and camel looks them up by name. So you don't need anonymous
processors in the Java DSL; you just need a way to load/register beans
by name that you can reference from your dynamic camel routes.

You're web app maybe needs to support letting folks edit, say, spring
XML files to define data formats so they can be loaded dynamically.

Red Hat

Twitter: jstrachan, fusenews

Open Source Integration

View raw message