How to lock files in a tomcat web application?
Posted
by yankee
on Stack Overflow
See other posts from Stack Overflow
or by yankee
Published on 2010-05-25T07:03:52Z
Indexed on
2010/05/25
7:11 UTC
Read the original article
Hit count: 237
The Java manual says:
The locks held on a particular file by a single Java virtual machine do not overlap. The overlaps method may be used to test whether a candidate lock range overlaps an existing lock.
I guess that if I lock a file in a tomcat web application I can't be sure that every call to this application is done by a different JVM, can I? So how can I lock files within my tomcat application in a reliable way?
© Stack Overflow or respective owner