You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by klausb <kl...@hp.com> on 2010/12/13 18:28:02 UTC

How to initiate a message exchange from a bean

The bean integration is a nice thing, because it hides the camel middleware
from the components. Unfortunately I can only use beans in a route, where
the trigger is defined elsewhere as a camel endpoint. What is the strategy
to define a route, where a bean initiates a message exchange because it has
its own trigger? Do I need to write my custom endpoint, which consumes my
bean? Or is there a different way?

Key point is, that I don't want to use camel APIs inside my bean for better
reuse.

FYI, I'm running camel inside the apache karaf osgi container. 

Klaus.
-- 
View this message in context: http://camel.465427.n5.nabble.com/How-to-initiate-a-message-exchange-from-a-bean-tp3303460p3303460.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to initiate a message exchange from a bean

Posted by Claus Ibsen <cl...@gmail.com>.
On Mon, Dec 13, 2010 at 6:28 PM, klausb <kl...@hp.com> wrote:
>
> The bean integration is a nice thing, because it hides the camel middleware
> from the components. Unfortunately I can only use beans in a route, where
> the trigger is defined elsewhere as a camel endpoint. What is the strategy
> to define a route, where a bean initiates a message exchange because it has
> its own trigger? Do I need to write my custom endpoint, which consumes my
> bean? Or is there a different way?
>
> Key point is, that I don't want to use camel APIs inside my bean for better
> reuse.

See the camel web site about hiding middleware.
Its also covered in chapter 14 in the Camel book.

>
> FYI, I'm running camel inside the apache karaf osgi container.
>
> Klaus.
> --
> View this message in context: http://camel.465427.n5.nabble.com/How-to-initiate-a-message-exchange-from-a-bean-tp3303460p3303460.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/