I have an spring batch application which is deployed on multiple servers (multiple JVMs). All the instances listen the common shared path for input file.
How can I ensure that, input file kept at shared location will be consumed by only one instance?