How to handle commit errors in JPA
I have a question about JPA/JTA error handling. If I commit a transaction, and it fails, what is the proper way to bring my entities back under management, fix the problem, and then re-commit?
Specifically, I am wondering how to determine the exact error that occured (so I can present it to the uer for correction). Also, it is my understanding that all entities become unmanaged after commit failure, so how should I handle that?
Also, are their vendor-specific API's for help with error handling that I should be using?
Thanks for any and all advice. This is a very confusing area to me.