Could you be a little more specific on where the blocking occurs? Line 567 synchronizes on application to prevent multiple threads from modifying the application state at the same time but by itself does not block anything. If the user aborts the request it should still be processed normally and the servlet exits the synchronization block and allows the next request to the same application to the processed.
I have also seen code and confused that line 567 is used for preventing multiple threads for modify application state.
But I am using Lamda Probe as Apache Tomcat monitoring tool. Which tells me that few thread are blocked at this line.
It shows me following log.
If one thread is inside the synchronized block then the others will block at that line and wait for the executing thread to finish the synchronized block. The question then becomes: what is the thread executing inside the synchronized block doing?
Note that the threads are all then UIDL requests for the same Application i.e. for the same user and session which sound a bit strange. It is completely possible that some threads are waiting for another thread (that’s the whole point of the synchronized block) but the threads should then continue after a short while (when the executing thread is done).