Applied a patch to fix concurrency issue when using JPA for persistence (see WOOKIE-145) - when errors occur due to possible race conditions/locking transactions are retried. Thanks to Randy Watler for the patch.