I am testing the JNLPDownloadServlet in Jetty. I am running into a problem where the servlet is basically locking the version.xml, my JNLP file, and any related jar files that are loaded from the JNLP file.
So the first time I request the JNLP that is located in the download servlet folder it loads and sends all of the files to the client. That part works correctly. I even have the version update working correctly.
Now say I want to update the main jar file so the client receives the latest updates. This is not a totally new version just a bugfix version so no need to create a whole new version. When I try to delete or rename the existing jar file it says the file is in use. In order for me to update the jar file I have to kill the Jetty application and restart it. But once it hits the jar file again I can't access it again.
Am I missing something or is this how the JNLPDowloadServlet is supposed to work?
This is on a Windows XP machine running Jetty 6.1.22 using the latest JNLPDownload servlet contained in the JRE 6.0 update 22.
There is nothing strange here. Windows keeps locks on files that are open, you can't alter them as long as the file is opened by a process. So in case of Java applications running from a jar, you can't update the jar while the application is still running and by extension webstart cannot do that either.
So there is no solving to be done. Before updating an application make sure it is not running. If you don't find that a logical step, try thinking about it some more.