marina,
How would you fix vladbalan's original example? Looking at slide 42:
[code]em.lock(d1, WRITE);
em.flush(); //version++ for d1[/code]
This looks like it'll issue an SQL "update" on the database which acquires a row-lock on most databases. It doesn't sound like even this approach would help vladbalan since one thread is only reading, not writing.
[Message sent by forum member 'cowwoc' (cowwoc)]
http://forums.java.net/jive/thread.jspa?messageID=316177