This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
I want to do some specific operation after a particular file is created in the directory. so I am using apache.commons.vfs api to monitor the directory.
first time it is working fine. After create the ("XXXXXXXXX") in the directory, fileCreated method had been invoked. List of operation is executed properly after that the file also get deleted from the directory.
But in the second time if the file ("XXXXXXXXX") is created in the directory then, fileCreated method is called twice? It is happened for the remaining all execution. Any idea why it is happening like this?
It would be good if any one provide the solution for this problem. Thanks in advance.
Got the same issue. When I add twice a file with the same name, the fileCreated method is launch twice.
For instance, my process is:
- I add a first file.
- The file is processed thru the fileCreated method then removed.
- I add a second file with the same name.
- The fileCreated method is called twice...
- Every time I add a file which name was previously used, fileCreated is called twice...
I will investigate on it and post a reply if I found the cause, but if someone already encountered this, please feel free to reply.