This simple application take advantage of Amazon Simple Workflow Service (SWF) exponential retry (@ExponentialRetry) to rollback and retry a database failed transaction 5 times at 10 seconds each. After 5 attempts the error is revealed.
Check source code here.