Adding Java EE 7 Batch Addon to JBoss Forge ? - Part 2 (Tech Tip #23)
Part 1 showed how to get started with creating an addon, add relevant POM dependencies, build and install the addon using Forge shell, and add parameters to the addon. This part shows how to add some meaningful semantics to those parameters.
Java EE 7 Batch define item-oriented processing where an item is read, optionally processed, and then written. Items could be read from an input source, CSV file, JMS destination, REST endpoint, database, or any other source. Similarly items can be written to an output stream, database, or some where else. This logic of reading, processing, and writing is captured in beans that are packaged in your WAR file. These beans need to either extend from a specific interface or extend an abstract class. For example item reader needs to either implement
ItemReader interface or extends
AbstractItemReader abstract class. Similarly item writer needs to either implement
ItemWriter interface or extend
Part 1 showed how to add
--writer parameters to the newly added
batch-new-jobxml command. This part will show how to identify classes for each CLI parameter that already honor the contract required by the Batch specification.
As earlier, the evolving source code is available at github.com/javaee-samples/forge-addons.
The timing for the next recording is unknown at this time because of my travel schedule, but sometime next week.