|
As it turns out this happens only on Windows (not sure why this would work on *X and fail on Windows, nothing like WORA right?). So I fixed this to move the file and use JarFile instead of JarURLConnection (I need to get the OAR's manifest). The key was JarFile.close(), with JarURLConnection there is no way to close access to the jar.
I also got around not using Rio's DownloadManager (this is a utility that uses an URLConnection to move files around) and instead simply use File.rename() for local file system use. I dont think there should be any issues using this approach for the FileSystemOARDeployHandler. What happens now is the OAR is moved, then extracted. You should be all set now. There still seems to be a latent locking issue with OAR drag and drop using Windows
Steps to reproduce using examples/bean:
1) 'ant oar' - deploys oar successfully Interestingly, if Rio is stopped and restarted (I used startall) the oar is again locked and the dir can't be deleted. Stopping Rio releases the lock and allows the bean dir to be deleted. I cannot reproduce removing the OAR, the original problem that this issue was reported under. I also get a different result when trying to delete the deploy/bean directory. I dont know why you would want to do this in any event.
If I try to delete the deploy/bean directory, I get an error indicating that bean-dl cannot be deleted. I am not sure whether this should be considered an outstanding issue right now, and if so it will be put under a very low priority. If the deployment is updated, the (bean) directory will be repopulated with updated contents. I vote that this issue be closed. Well, it looks like this issue should be resolved now. I have managed to do exactly what has been described here, including deleting the directory after undeployment, and all works as expected. Please verify this is indeed the case for you and we can close this issue.
|
||||||||||||||||||||||||||||||||||||||||||||||||||
The update check is made based on the value returned from File.lastModified. If the value is after the previous installation date the deployment is updated, If not the OAR is ignored