camel-users mailing list archives

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

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
scenario.

Bellow is a sample code:

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

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


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

class MyReturnedBean {
     void doSomething() {
     }
}

I really appreciate your help.

--
View this message in context: http://camel.465427.n5.nabble.com/Invoking-a-bean-returned-by-a-previous-bean-invocation-tp5676696.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message