top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to handle multiple concurrent database requests/updates when using JDBC with servlets?

+3 votes
489 views
How to handle multiple concurrent database requests/updates when using JDBC with servlets?
posted Oct 15, 2015 by Shyam

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

Multiple database updates on different rows, if you are using servlets the servlets will open multiple connections for different users. In this case there is no need to do additional programming.
If database updates are on the same row then the rows are locked automatically by the dbms, hence we have to send requests to the dbms repeatatively until the lock is released by dbms.

This issue is dealt with in the JDBC documentation; look up “Transactions” and “auto-commit”. It can get pretty confusing.

answer Oct 16, 2015 by Karthick.c
...