Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>What do you mean by MDB? MessageDrivenBean? If the answer if yes - what do you mean by reading from MDB multiple times? Since MDBs are message-driven, we can't read from them at any time, so basis on my understanding of your question I'd do it in the following way:</p> <ol> <li>MDB receives message and stores received entry in some DB table - that would be some kind of transition table; such tables are often used during processing of financial transactions</li> <li>Batch window comes - job is triggered.</li> <li>Now you can query the table in any way you want. Since you are looking for splitting and processing the data concurrently, I'd advice using <a href="http://static.springsource.org/spring-batch/reference/html/scalability.html#partitioning" rel="nofollow">Spring Batch partitioning</a> with <code>TaskExecutorPartitionHandler</code> executing step locally in concurrent threads. What you need to do is to read data from database differentiating on combination of column values - that should be relatively easy - it's just a matter of constructing appropriate SQL query.</li> <li>Processed chunks are aggregated into <code>ItemWriter write(List&lt;? extends T&gt; items)</code> depending on commit interval; if such aggregation is not enough for you, I'd add another table and Batch step that aggregates previously processed entries.</li> </ol> <p>Basically that's how batch processing works - you read items, transforms them and write. The next step - if it's not just a simple tasklet - does exactly the same.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload