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:
- increase the backlog parameter.
- increase the timeout parameter.
- Try to minimize the load on the Database server side.
- 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.
©2018 Martin Webb