Hello,
   I'm using Java DSL and my route looks something like this :

        RouteBuilder rb = new RouteBuilder() {
            public void configure() {
                from("direct:testRoute")
                        .routeId("r1")
                        .split(body().tokenize(","))
                                .streaming()
                                .parallelProcessing()
                                .to("stream:err")
                                .bean(MyBeanClass.class, "camelSpider")
                                .to("stream:err")
                ;
            }
        };        
        context.addRoutes(rb);
        template.sendBody("direct:receptRoute", "Work1,Work2,Work3,Work4");

Message "Work1,Work2,Work3,Work4" will be split on 4 routes and every route
will be executed in parallel  and method "camelSpider" will be called on
MyBeanClass. 
But what I would like to do is that every route will have new instance of
MyBeanClass, not the some instance (Singleton design pattern). Any idea how
to do this? Thank you

Regards,
   Matic





--
View this message in context: 
http://camel.465427.n5.nabble.com/Route-split-bean-method-call-and-new-bean-instance-tp5618418p5618418.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to