I am working on a warehouse management system, using JPA 2.0 - EclipseLink and I have come across the need to implement concurrent transactions, currently I am implementing a timestamp difference to validate the last time the quantities are altered: added, removed, transferred.
This strategy seems a bit flawed, and requires a lot of manual verification's, that may create bugs, are there alternative methods of doing this that are provided by the JPA framework?