Skip to main content

Java EE and batch processing

Please note these forums are being decommissioned and use the new and improved forums at
1 reply [Last post]
Joined: 2003-08-04

I know that there is a batch processing JSR in the works.

In the meantime, what are some of the patterns people have used for batch
processing in a Java EE 6 system?

We're looking uneasily at doing something that would involve kicking off a
bunch (hundreds) of asynchronous EJB calls (returning Futures) and then
somehow coordinating the Futures with the equivalent of a CountdownLatch
(so that when all several hundred tasks are complete we can take a summary

(We might be able to use an *actual* CountdownLatch if we can guarantee
that all the beans we're coordinating are @Local (so that they could call
methods on a locally-passed CountdownLatch). This still smells pretty
awful to me, however.)

Another alternative involves building a complicated pinball machine out of
message-driven beans that somehow notify a
stateful-for-the-life-of-the-coordination bean when all of the several
hundred asynchronous tasks are completed. This smells even worse to me.

I have no interest in pulling in Spring batch, just for the record.

Please feel free to email me directly with any approaches you've seen in
the wild that have worked, or feel free to post them to the forums.



Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2012-02-06

Did you look at Spring Batch?