IBM EJB2.1 CMP Entity Bean Optimistic Concurrency Conflict Detection Not Working
posted 8 years ago
I'm unable to get EJB 2.1 CMP entity-bean optimistic concurrent-update detection to work. I tried 2 approaches:
1) Modified the access-intent to wsOptimisticUpdate. In the mapping editor, specified a mapped-column as the predicate for optimistic-access intent. This column is a simple, non-nullable integer counter. 2) Modified the access-intent to wsOptimisticUpdate. In the mapping editor, set the Column for Collision Detection in the Beans to Table Strategy properties section to a column which is not mapped.
In the 2 cases above, I used Rational IDE's generated data-access beans to get all the data from the entity-bean and pass it to the presentation layer. The same bean is passed back to the persistence layer with some properties modified.
I have 2 computers reading the same record at the same time and updating it one after the other. I expected Websphere to detect the concurrent modification but that never happen and no exception is thrown.
Is there something I missed?
I'm using Websphere 126.96.36.199 in Rational Software Architect 188.8.131.52.