Is there an MBean in Jboss that watches a specified directory and fires off some event if a file suddenly appears in that directory? We really don't want to use a timer to constantly check this directory.
We're wanting to fire off some code when a user ftps a file up to our server.
Any ideas would be appreciated.
I don't think Java has an API to "watch" a directory. Some OSes can do it by registering with the operating system I hear.
Directory scanning is very fast and cheap anyway. Talk about premature optimization...