• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

URLyBird: about how to deal with the situation book a record(booked)

 
Ronggen Liu
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

how do you handle the scenario when the user book a record, wihich had been booked by the other user.

my solution is to define a checked exception BookFailedException, and throw it in business method bookRecord.

and handle this in client by getting the root cause of the excepiton, and raise a alert window to show the right information to the user.

what do you guys think about it?

Thank you!
Ronggen
 
Chih-Wei Lee
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi:
I have the similar solution for this issue.
I also define a custom exception to throw if the scenario occurs but
I throw this exception in my database implementation.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic