everytime I execute an EJB method, I would like to lock data in order to avoid that others users access the same data. I have an Oracle table.
SAP indicates two methods:
- Enqueue Server Locking (but I can't use it because I have only a server and in anycase it doesn't works).
- Database Locking (I can't use it because I have a data-source, so no possibility to use select for update)
Perhaps I have to use "no automatic locking" in the persistent.xml and then use the EJBLocking API to lock inside the entity methods code . If this is the correct way... could you exaplain me in details how to do? There are also others solutions?
Thanks a lot. It's very important to solve the issue.