Using RMI to detect an arival of a file.
I would like to write an RMI application that will have the capability to detect an arival of a file in a designating incomming directory, lets call this /data/incomming. I perceive this RMI app to be a module of a larger program, lets say a flat file database.
Wnen the file arrives in /data/incomming, the file is detected and a triggering mechanism is fired off and a process is executed against the arriving file. For the sake of ease, this process could be to update a flat file database with the arriving flat file data.
For all I know this could be a big waist of time, and I could simply write a Java program module that wakes up every 2 minutes, and checks the /data/incomming directory for a specified file.
Just currious to see if anyone has worked with RMI like this.
Thanks

