Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

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?

irt.org | Knowledge Base | Java | Q4081 [ previous next ]

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?

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.

Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.