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

[818 byte] By [mailmana] at [2007-10-2 20:22:07]
# 1
RMI doesn't add much value to this. For one thing it assumes at least two JVMs and I don't know why you would need them otherwise. Observer/Observable would do the job just as well, or some kind of listener, in the same JVM.
ejpa at 2007-7-13 23:04:43 > top of Java-index,Core,Core APIs...
# 2
I did not think that it would in this respect. I am going to take a look at the Observe/Observable methodology.Thanks Again!
mailmana at 2007-7-13 23:04:43 > top of Java-index,Core,Core APIs...