Thanks for the replies. I can throw an exception, but the problem is the records for that table will be inserted from many places, as well as inserted manually. So at any time there should be only one record, and that one record will be used for further processes.
I have now used javascript to disable the save button.
Synchronization is one of the services offered by the EJB container. That is, among others, the beauties that it can offer us.
Gabriel, can you please elobrate on this.
Thanks again.