Ok,
you talk about HTTP requests. In this case the request is finished with sending the result, all transactions and entities should be persistent (exept if you use statefull session with extended persistence context).
For me it sounds like a concurrency problem when generating the id, have you checked the load testing whether the id is duplicated here because of multithreading and the requests are send twice?