camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chirag Dewan <>
Subject Passing a reference of MyObject to a bean
Date Thu, 09 Jan 2014 14:07:37 GMT
Hi all,

This may be a very straight forward thing,but I was not able to find it.

I have a route like: 

public class MyRouteBuilder extends RouteBuilder

    private MyObject myObject;

    public MyRouteBuilder(MyObject myObject)

        this.myObject = myObject;


    public void configure() throws Exception

        from( "file:./src/inbox").bean( MyBean.class, "process(myObject)"  ).to( "file:./src/outbox"


And my bean:

public class MyBean{

public void process(MyObject myObject){

//some processing on myObject


Now I want to pass myObject instance to the bean. But somehow I was not able to do that.

Any help is much appreciated.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message