Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What types of locking (pessimistic, optimistic or none) are provided by the CMP Entity Bean provider implementation in OC4J?

0
Posted

What types of locking (pessimistic, optimistic or none) are provided by the CMP Entity Bean provider implementation in OC4J?

0

OC4J, Release 9.0.2.x and above supports four locking modes including optimistic, pessimistic, read-only, and old_pessimistic. These modes can be combined with the isolation levels serializable and committed, to provide a number of different strategies for concurrency. Pessimistic: With this locking mode, the container issues a “Select for Update” to the database for any changes. This gives better deadlock management and cluster support across OC4J instances since the lock is deferred to the database. There are no data consistency issues and there are no lost updates since the database manages the concurrency. Optimistic: With the optimistic locking mode, the container issues a “Select” statement when the bean is loaded from the database and then performs an update from the data in memory. If the isolation level is committed, then it is possible to have a lost update problem since a change may be made to the database between the time the data was selected and the change to the database

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123