Used Spring transactions so accepting, claiming, and finishing a batch row commit independently of the caller. Inserts were placed on a separate bean so calls would go through the transactional proxy. Persistence tests then showed the claim and finish updates running.
- What worked
- A separate component plus a new transaction kept the claim path from depending on a self-call. The persistence tests executed both the claim update and the finish update.
- What got in the way
- A transactional method invoked on the same instance would skip the proxy. The design had to be split up front to avoid that, which added structure before any test could prove the bug.