I just had a quick question. Are you guys handling Business service concurrency as well?
So what if
Thread 1 comes in, get a lock on rec #2, then Thread 1 completes and books the room. Then thread 2 comes in at the same time and is waiting for the lock. Do you have some type of kick-out on the update method to say that if the Room is not available, then throw an exception?
This is how I implemented it.. I was wondering what you guys did.
Because is doing this enough??
if(room.isAvailable()) {
database.update(recNo);
} else throw RecordNotFoundException.
Or would you have to do what I did, and if two records get a lock, the second one that tries to update is kicked out.
This is the call from the business service.