Under what circumstances a table/row is locked exclusively if Optimistic=true & LockManager=version?

1 message Options
Embed this post
Permalink
Frank Le

Under what circumstances a table/row is locked exclusively if Optimistic=true & LockManager=version?

Reply Threaded More More options
Print post
Permalink
Hi,

I'm running into table lock contention: 2 sessions are blocking waiting for a blocked session (both an insert and a delete statement waiting on a select statement!). This doesn't make any sense to me, therefore, without even understand my application, can someone please tell me under what circumstances a table/row is locked exclusively if Optimistic=true & LockManager=version? A few facts:
1) My app doesn't acquire any lock explicitly through JPA or native queries "select ... for update", "lock table ...", etc.
2) I'm sure my app causes this contention.
3) It seems the table is lock in exclusive mode i.e. can only query, however, I can't verify this.

OpenJPA 1.0.0
Oracle 10g R2
Oracle JDBC 10.1.0.3

Thanks very much in advance,
Frank

Keywords: database hangs, lock, contention, deadlock