What types of locking (pessimistic, optimistic or none) are provided by the CMP Entity Bean provider implementation in OC4J?
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