camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [CONF] Apache Camel > Bean Integration
Date Mon, 25 Jul 2011 18:23:00 GMT
    <base href="">
            <link rel="stylesheet" href="/confluence/s/2042/9/1/_/styles/combined.css?spaceKey=CAMEL&amp;forWysiwyg=true"
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="">Bean
    <h4>Page <b>edited</b> by             <a href="">Claus
                         <h4>Changes (1)</h4>
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" > <br>h3. [Bean Binding] <br></td></tr>
            <tr><td class="diff-changed-lines" >Whenever Camel invokes a bean
method, either via the [Bean] component, [Spring Remoting] or [POJO Consuming] then the [Bean
Binding] mechanism is used to figure out what method to use (if it is not explicit) and how
to bind the [Message] to the parameters possibly using the [Parameter Binding Annotations]
<span class="diff-added-words"style="background-color: #dfd;">or using a [method name
option|Bean Binding]</span> <br></td></tr>
            <tr><td class="diff-unchanged" > <br>h3. Annotations <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <h2><a name="BeanIntegration-BeanIntegration"></a>Bean Integration</h2>

<p>Camel supports the integration of beans and POJOs in a number of ways</p>

<h3><a name="BeanIntegration-BeanBinding"></a><a href="/confluence/display/CAMEL/Bean+Binding"
title="Bean Binding">Bean Binding</a></h3>
<p>Whenever Camel invokes a bean method, either via the <a href="/confluence/display/CAMEL/Bean"
title="Bean">Bean</a> component, <a href="/confluence/display/CAMEL/Spring+Remoting"
title="Spring Remoting">Spring Remoting</a> or <a href="/confluence/display/CAMEL/POJO+Consuming"
title="POJO Consuming">POJO Consuming</a> then the <a href="/confluence/display/CAMEL/Bean+Binding"
title="Bean Binding">Bean Binding</a> mechanism is used to figure out what method
to use (if it is not explicit) and how to bind the <a href="/confluence/display/CAMEL/Message"
title="Message">Message</a> to the parameters possibly using the <a href="/confluence/display/CAMEL/Parameter+Binding+Annotations"
title="Parameter Binding Annotations">Parameter Binding Annotations</a> or using
a <a href="/confluence/display/CAMEL/Bean+Binding" title="Bean Binding">method name
option</a> </p>

<h3><a name="BeanIntegration-Annotations"></a>Annotations</h3>
<p>If a bean is defined in <a href="/confluence/display/CAMEL/Spring" title="Spring">Spring</a>
XML or scanned using the Spring 2.5 component scanning mechanism and a <b>&lt;camelContext&gt;</b>
is used or a CamelBeanPostProcessor then we process a number of Camel annotations to do various
things such as injecting resources or producing, consuming or routing messages.</p>

	<li><a href="/confluence/display/CAMEL/POJO+Consuming" title="POJO Consuming">POJO
Consuming</a> to consume and possibly route messages from Camel</li>
	<li><a href="/confluence/display/CAMEL/POJO+Producing" title="POJO Producing">POJO
Producing</a> to make it easy to produce camel messages from your POJOs</li>
	<li><a href="/confluence/display/CAMEL/DynamicRouter+Annotation" title="DynamicRouter
Annotation">DynamicRouter Annotation</a> for creating a <a href="/confluence/display/CAMEL/Dynamic+Router"
title="Dynamic Router">Dynamic Router</a> from a POJO method</li>
	<li><a href="/confluence/display/CAMEL/RecipientList+Annotation" title="RecipientList
Annotation">RecipientList Annotation</a> for creating a <a href="/confluence/display/CAMEL/Recipient+List"
title="Recipient List">Recipient List</a> from a POJO method</li>
	<li><a href="/confluence/display/CAMEL/RoutingSlip+Annotation" title="RoutingSlip
Annotation">RoutingSlip Annotation</a> for creating a <a href="/confluence/display/CAMEL/Routing+Slip"
title="Routing Slip">Routing Slip</a> for a POJO method</li>
	<li><a href="/confluence/display/CAMEL/Bean+Injection" title="Bean Injection">Bean
Injection</a> to inject Camel related resources into your POJOs</li>
	<li><a href="/confluence/display/CAMEL/Using+Exchange+Pattern+Annotations" title="Using
Exchange Pattern Annotations">Using Exchange Pattern Annotations</a> describes how
the pattern annotations can be used to change the behaviour of method invocations with <a
href="/confluence/display/CAMEL/Spring+Remoting" title="Spring Remoting">Spring Remoting</a>
or <a href="/confluence/display/CAMEL/POJO+Producing" title="POJO Producing">POJO Producing</a></li>

<h3><a name="BeanIntegration-SpringRemoting"></a>Spring Remoting</h3>
<p>We support a <a href="/confluence/display/CAMEL/Spring+Remoting" title="Spring
Remoting">Spring Remoting</a> provider which uses Camel as the underlying transport
mechanism. The nice thing about this approach is we can use any of the Camel transport <a
href="/confluence/display/CAMEL/Components" title="Components">Components</a> to
communicate between beans. It also means we can use <a href="/confluence/display/CAMEL/Content+Based+Router"
title="Content Based Router">Content Based Router</a> and the other <a href="/confluence/display/CAMEL/Enterprise+Integration+Patterns"
title="Enterprise Integration Patterns">Enterprise Integration Patterns</a> in between
the beans; in particular we can use <a href="/confluence/display/CAMEL/Message+Translator"
title="Message Translator">Message Translator</a> to be able to convert what the
on-the-wire messages look like in addition to adding various headers and so forth.</p>

<h3><a name="BeanIntegration-BeanComponent"></a>Bean Component</h3>
<p>The <a href="/confluence/display/CAMEL/Bean" title="Bean">Bean</a> component
supports the creation of a proxy via <a href=""
class="external-link" rel="nofollow">ProxyHelper</a> to a Java interface; which the
implementation just sends a message containing a <a href=""
class="external-link" rel="nofollow">BeanInvocation</a> to some Camel endpoint. </p>

<p>Then there is a server side implementation which consumes a message and uses the
<a href="/confluence/display/CAMEL/Bean+Binding" title="Bean Binding">Bean Binding</a>
to bind the message to invoke a method passing in its parameters.</p>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;">
            <a href=""
class="grey">Change Notification Preferences</a>
        <a href="">View
        <a href="">View
        <a href=";showCommentArea=true#addcomment">Add

View raw message