Servlet File Locking issue where FileLock may not apply
I'm having issues with File Access Synchronization. The basic setup involves a servlet being used for uploading files to a website. The web page (Ajax-y goodness) prepares the upload form and upon submission of the form, repeatedly calls a progress-checking servlet. The upload form is sent to a separate servlet which, during the upload, creates and updates a temporary file containing the upload progress.
As far as I'm aware, these servlets are different threads within the same JVM, though they might be processes... If they ARE running in the same JVM, I CANNOT USE java.nio.FileLock. (As it mentions in the documentation, FileLock is not appropriate for multiple threads within one JVM as it gives file access to the entire JVM, not just one thread.) (I'm using Tomcat and am unsure whether calling a servlet spawns threads or processes.) Either way, the uploading servlet creates a user-unique temporary file based on the user id. (One progress file per user. A specific user's progress file will always have the same name, but we are assuming someone is only attempting one upload at a time...) The progress-reading servlet generates the same file name and reads the file, returning the results to the user.
Both servlets generate their own reference to the file, so I don't trust to synchronize on their File objects instances. [Would that work? Can 2 threads synchronize on independently generated file instances if they both point to the same file?] On the other hand, I don't want to synchronize on any single class as EVERY user would then synchronize on that class, which is far more restrictive than we need.
I guess I'm kind of stuck. Every solution I've found expects the two threads to be closely connected to the point that they can share the same file reference, or they expect the processes to be running on separate JVMs. Any assistance would be greatly appreciated.

