camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [CONF] Apache Camel > SpringBatch
Date Wed, 06 Jun 2012 12:26: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="">SpringBatch</a></h2>
    <h4>Page <b>edited</b> by             <a href="">Henryk
                         <h4>Changes (2)</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" >{warning} <br> <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">h3.
Job execution <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">h3.
Usage <br></td></tr>
            <tr><td class="diff-unchanged" > <br>When Spring Batch component
receives the message, it triggers the job execution. The job will be executed using the {{org.springframework.batch.core.launch.JobLaucher}}
instance resolved according to the following algorithm: <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <h2><a name="SpringBatch-SpringBatchComponent"></a>Spring Batch

<p>The <b>spring-batch:</b> component and support classes provide integration
bridge between Camel and <a href="" class="external-link"
rel="nofollow">Spring Batch</a> infrastructure.</p>

<p>Maven users will need to add the following dependency to their <tt>pom.xml</tt>
for this component:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-xml">
<span class="code-tag">&lt;dependency&gt;</span>
    <span class="code-tag">&lt;groupId&gt;</span>org.apache.camel<span
    <span class="code-tag">&lt;artifactId&gt;</span>camel-spring-batch<span
    <span class="code-tag">&lt;version&gt;</span>x.x.x<span class="code-tag">&lt;/version&gt;</span>
    <span class="code-tag"><span class="code-comment">&lt;!-- use the same
version as your Camel core version --&gt;</span></span>
<span class="code-tag">&lt;/dependency&gt;</span>

<h3><a name="SpringBatch-URIformat"></a>URI format</h3>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
<p>Where <b>jobName</b> represents the name of the Spring Batch job located
in the Camel registry.</p>

<div class='panelMacro'><table class='warningMacro'><colgroup><col width='24'><col></colgroup><tr><td
valign='top'><img src="/confluence/images/icons/emoticons/forbidden.gif" width="16"
height="16" align="absmiddle" alt="" border="0"></td><td>This component can
only be used to define producer endpoints, which means that you cannot use the Spring Batch
component in a <tt>from()</tt> statement.</td></tr></table></div>

<h3><a name="SpringBatch-Usage"></a>Usage</h3>

<p>When Spring Batch component receives the message, it triggers the job execution.
The job will be executed using the <tt>org.springframework.batch.core.launch.JobLaucher</tt>
instance resolved according to the following algorithm:</p>
	<li>if <tt>JobLauncher</tt> is manually set on the component, then use
	<li>if <tt>jobLauncherRef</tt> option is set on the component, then search
Camel Registry for the <tt>JobLauncher</tt> with the given name.</li>
	<li>if there is <tt>JobLauncher</tt> registered in the Camel Registry under
<b>jobLauncher</b> name, then use it.</li>
	<li>if none of the steps above allow to resolve the <tt>JobLauncher</tt>
and there is exactly one <tt>JobLauncher</tt> instance in the Camel Registry,
then use it.</li>

<p>All headers found in the message are passed to the <tt>JobLauncher</tt>
as job parameters. <tt>String</tt>, <tt>Long</tt>, <tt>Double</tt>
and <tt>java.util.Date</tt> values are copied to the <tt>org.springframework.batch.core.JobParametersBuilder</tt>
- other data types are converted to Strings.</p>

<h3><a name="SpringBatch-Options"></a>Options</h3>

<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<th class='confluenceTh'> Name </th>
<th class='confluenceTh'> Default Value </th>
<th class='confluenceTh'> Description </th>
<td class='confluenceTd'> <tt>jobLauncherRef</tt> </td>
<td class='confluenceTd'> <tt>null</tt> </td>
<td class='confluenceTd'> <b>Camel 2.10:</b> Explicitly specifies the name
of the <tt>JobLauncher</tt> to be used.</td>

        <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