Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

IBM EJB2.1 CMP Entity Bean Optimistic Concurrency Conflict Detection Not Working

 
Benedict Chng
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 6.1.0.5 in Rational Software Architect 7.0.0.2.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!