camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tarun Kumar <agrawal.taru...@gmail.com>
Subject bean with method parameters in camel
Date Thu, 30 May 2013 09:48:56 GMT
If i try .bean(className, methodName('a', 'b')) : it calls method
methodName of class className with method parameters 'a' and 'b'. However,
if i want value of method variables to come from class variables, how can i
do that?

what i mean is :
class abc extends RouteBuilder {
  private string str1 = 'a';
  private string str2 = 'b';
.....
.....
to().bean(className, methodName(str1, str2)).end();

i get str1 and str2 classes not found exception. How can i pass str1 and
str2 values as method parameters without actually hardcoding them?

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