Sample code from my presentation Implementing Batch Processing in Java EE 7