what happens when ejbStore() is called on locked row

Discussions

EJB programming & troubleshooting: what happens when ejbStore() is called on locked row

  1. How does container respond to ejbStore() on a locked row by a stored procedure(complex calculation accessing multiple tables and self-joins) running on the database.

    Will the container throw ejb exception? or will it wait till the lock is released and then fire the store()
  2. I would imagine that the precise details would depend on the JDBC driver you are using, but most likely it will wait until (a) the lock is release or (b) some timeout threshold is reached (in which case it will throw some kind of exception).

    This is more a JDBC issue than an EJB issue.
  3. It gives exception,Locks are of two types,read lock and write lock.If read lock then it can't read the data,if it is write lock then it can't write the data and save.