the Application Server does (in the same transaction) something like: 1) a "select * from Customer_table where customer_id="+the_customer_id, an extracts the "version number" 2) if the version number has not changed, do "update Customer_table set .... where customer_id="+the_customer_id.
The problem that I see there is that if the transaction is done with the "transaction isolation level" < "repeatable read"(say, "read committed"), then the customer data which id is "the_customer_id" could be changed by another transaction between 1) and 2) ,and so the data extracted at 1) is stale.
Also, the ORM may generate a "SELECT FOR UPDATE" at 1) but that would be similar to an "PESSIMISTIC LOCKING" ?
Could somebody explain me if i am right ? Why the solution proposed in the article is safe (maintains the Consistency of the Database)?
Also could somebody tell me if the "transaction isolation level" could be defined precisely for each entity bean operation ?