Presently we are using JDBC in the data layer and planning to replace it with hibernate. I am new to Hibernate and not sure how hibernate handles concurrency. Can somebody e
There are JPA implementations like objectDB in which optimistic locking is activated by default and user don't need to maintain version variable in database table as, it is internally taken care by objectDB. Optimistic locking is good where updates are not frequent and where locking have implicit costs like in e-commerce where locking means loss of business. Pessimistic locking is ideal where concurrency is not much demanded and transaction is finished quickly to free up the resource.