Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap

Q4081 I have written a servlet that sets AutoCommit(false) and executing several insert statements with a final commit at the end. When this servlet is accessed simultaneously by several browsers, the servlet hangs and has to be restarted. Is there a way to prevent this from happening?

You are here: irt.org | FAQ | Java | Q4081 [ previous next ]

This is a genral problem that occurs with servlets if proper strategic planning is not done. I don't know the exact situation you are having but you can check out the following:

  1. increase the backlog parameter.
  2. increase the timeout parameter.
  3. Try to minimize the load on the Database server side.
  4. Even if the database activity takes a long time, then use session tracking suspend from the client browser and just remember the session. Respond to the client browser when the task is complete - meanwhile show some thing else.
  5. ©2018 Martin Webb