When building web applications, what are some areas where synchronization problems arrise?

Brian O'Byrne

In general, you will run into synchronization issues when you try to access any shared resource. By shared resource, I mean anything which might be used by more than one request.

Typical examples include:

  • Connections to external servers, especially if you have any sort of pooling.
  • Anything which you include in a HttpSession. (Your user could open many browser windows and make many simultaneous requests within the one session.)
  • Log destinations, if you do your own logging from your servlets.