0

I am developing a web application in JSP with back-end MySQL.

I need my application to be used by more than one users simultaneously for transactions.

There i am facing the following problems.

  • In the application, there are time slots available to make appointments.
  • When multiple users are making appointments on the same slot simultaneously, system shows message like appointments has been made. In the back end , both datas are saved with different id ( for the same slot).
  • But in the front end- it shows only one user data.

How can make synchronization in the function.

Please help me to solve the problem

Sarin Jacob Sunny
  • 2,138
  • 3
  • 29
  • 61

1 Answers1

1

I think, currently how you codes your logic like, once the instruction to book the slot from the user , just save it.

Try like this, after when you got the instruction to book a slot, in java page( in saving logic ) first check to make sure no one else has made it. If no such result found book it, else show message that its already booked.

Sarin Jacob Sunny
  • 2,138
  • 3
  • 29
  • 61