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 early version of the new website
https://camel.apache.org/staging/
We would very much like to receive any feedback on the new site, please join the discussion on the Camel user mailing list.
EJB ComponentAvailable as of Camel 2.4 The ejb: component binds EJBs to Camel message exchanges. Maven users will need to add the following dependency to their <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-ejb</artifactId> <version>x.x.x</version> <!-- use the same version as your Camel core version --> </dependency> URI formatejb:ejbName[?options] Where ejbName can be any string which is used to look up the EJB in the Application Server JNDI Registry Options
You can append query options to the URI in the following format, The EJB component extends the Bean component in which most of the details from the Bean component applies to this component as well. Bean BindingHow bean methods to be invoked are chosen (if they are not specified explicitly through the method parameter) and how parameter values are constructed from the Message are all defined by the Bean Binding mechanism which is used throughout all of the various Bean Integration mechanisms in Camel. ExamplesIn the following examples we use the Greater EJB which is defined as follows: Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20
And the implementation Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20
Using Java DSLIn this example we want to invoke the Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20
Then we are ready to use the EJB in the Camel route: Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20
In a real application server In a real application server you most likely do not have to setup a Using Spring XMLAnd this is the same example using Spring XML instead: Again since this is based on an unit test we need to setup the EJB component: Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20
Before we are ready to use EJB in the Camel routes: Error formatting macro: snippet: java.lang.IndexOutOfBoundsException: Index: 20, Size: 20
|