OCPJP 6, OCMJD
OCPJP 6, OCMJD
Roel De Nijs wrote:The unlock-method should always be executed, so the common code for this would be (or something similar of course)
try {
lock(1);
update(1, newData);
} catch (SomeException1 e) {
} catch (SomeException2 e) {
} finally {
unlock(1);
}
Roel De Nijs wrote:If you succeeded to lock record 1, how can you then not own the lock for that record when unlocking record 1. Because if you didn't have the lock for record 1, you can't update the record
OCPJP 6, OCMJD
OCPJP 6, OCMJD
OCPJP 6, OCMJD
Glen Iris wrote:How can I inform a client that their attempted update failed when Oracles supplied Update method has a void type?
Glen Iris wrote:What are your thoughts on just throwing a RuntimeException with the String message passed to it by the underlying IOExceptions / DuplicateKeyExceptions / InterruptedException?
Don't get me started about those stupid light bulbs. |