camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Purple Tea <>
Subject Invoking a bean returned by a previous bean invocation
Date Mon, 30 Apr 2012 19:26:48 GMT

I have a route that returns a bean, and I would like to call a method in the
bean that was returned (which isn't in the registry). 
I've been looking at the bean binding documentation but I didn't find this

Bellow is a sample code:

<bean id="myBean" class="com.MyBean">

      <from uri="direct:start" />
      <to ref="myBean" method="getBean" />
      <to ref="myReturnedBean" method="doSomething" />

class MyBean  {
     MyReturnedBean getBean () {
         return new MyReturnedBean();

class MyReturnedBean {
     void doSomething() {

I really appreciate your help.

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message