First published on November 23 2005 and tagged JBoss .
Here is a follow up from my last article based on a e.mail exchange I had with Julien.
The framework we currently use (JCoffee) is indeed managing by itself optimistic locking - by using a compulsory version field to the CMP -. It does not rely on jboss locking features. The editor vision is indeed to be application server vendor independent. [update: nice vison, technically impossible though… cf. comments]
As Julien pointed me out:
Jboss also supports REPEATABLE_READ transaction isolation level for the
Instance Per Transaction policy'', forcing the CMP engine to perform SELECT FOR UPDATE'' queries.
But beware, according to what I just read Oracle (and Postgres) only support using FOR UPDATE for queries that do not include SELECT DISTINCT.