Since we're on a major migration process of this website, some component documents here are out of sync right now. In the meantime you may want to look at the asciidoc in the repository: https://github.com/apache/camel/blob/master/README.md https://github.com/apache/camel/blob/master/components/readme.adoc
The purpose of the Bean Language is to be able to implement an Expression or Predicate using a simple method on a bean. The bean name is resolved using a Registry, such as the Spring
Using Bean Expressions in Java
Using Bean Expressions in Spring XML
Bean Attribute Now Deprecated
Writing the Expression Bean
The bean in the above examples is just any old Java Bean with a method called
We can also use the Bean Integration annotations.
So you can bind parameters of the method to the Exchange, the Message or individual headers, properties, the body or other expressions.
The Bean Language also supports invoking beans that isn't registered in the Registry. This is usable for quickly to invoke a bean from Java DSL where you don't need to register the bean in the Registry such as the Spring
The 2nd parameter
In Camel 2.2: you can avoid the
Which also can be done in a bit shorter and nice way:
We have some test cases you can look at if it'll help
The Bean language is part of