Hi, I was going through the online documentation and while reading through the "Advanced JDO -> Design" page I came across the following:
"If a transaction requires a read lock on an object which is write-locked by another transaction, or requires a write lock on an object which is read-locked by another transaction, the transaction will block until the lock is released, or the lock timeout has elapsed. The lock timeout is a property of the transaction and is specified in seconds. A org.exolab.castor.persist.LockNotGrantedException is thrown if the lock could not be acquired within the specified timeout." When I use the DbLock and ReadOnly mode I find this statement to be true only one way i.e. When I have an object retrieved in the DbLocked mode and then I try retrieving the object in the ReadOnly mode using a different transaction (in a multithreaded environment), the retrieve issued from the second transaction blocks waiting for the first to complete. But, when I have an object retrieved in the ReadOnly mode and then try retrieving the object in the DbLocked mode using a different transaction (in a multithreaded environment), the retrieve issued from the second transaction is completed without getting blocked. Is that because the ReadOnly mode does not take a read lock on the object, but it does check if the object is retrieved in the DbLocked mode? Regards, Vishal. Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. ------------------------------------------------- If you wish to unsubscribe from this list, please send an empty message to the following address: [EMAIL PROTECTED] -------------------------------------------------