blob: 5b2d74b83939df44281ef6ba691906d59e6453b5 [file] [log] [blame]
h2. servicemix-bean
h3. Overview
The ServiceMix Bean component provides integration with beans (POJOs) with the JBI bus to make it easy to use POJOs to process JBI message exchanges. Like in an Message Driven Bean in J2EE a POJO will receive a message from the NMR and process it in any way it likes. Unlike in a JMS component where the coding is already done the Bean component gives the developer the freedom to create any type of message handling but it must be hand coded all the way.
h4. Namespace and xbean.xml
The namespace URI for the servicemix-bean JBI component is {{}}. This is an example of <filename>xbean.xml</filename> file with a namespace definition with prefix {{bean}}.
<beans xmlns:bean="">
<!-- add bean:endpoint definitions here -->
h4. Endpoint types
The servicemix-bean component only defines one endpoint, called {{bean:endpoint}}. It can be used to receive and send message exchanges from/to the NMR.
h3. {{Endpoint bean:endpoint}}
h4. Using a Java class
When definining a {{bean:endpoint}} specifying a Java class name, a new instance of this class will be created for handling a single message exchange.
<beans xmlns:bean=""
<bean:endpoint service="my:service" endpoint="endpoint"
h4. TODO: add other configuration types