what is the correct pattern for handling OLE in a (REST) web service? this is what i\'m doing now, for example,
protected void doDelete(HttpServletRequest re
If you get an optimistic locking exception, it means that some other transaction has committed changes to entities you were trying to update/delete. Since the other transaction has committed, retrying immediately might have a good chance to succeed.
I would also make the method fail after N attempts, rather than waiting for a StackOverflowException to happen.