From: Michael W. (JIRA) <ji...@co...> - 2006-08-10 19:57:12
|
[ http://jira.codehaus.org/browse/JETTY-60?page=comments#action_72053 ] Michael Waluk commented on JETTY-60: ------------------------------------ The instructions on the wiki - using the new useFileMappedBuffer configuration point on DefaultServlet - probably works for WebAppContexts, but it doesn't seem to work for simple Contexts. I thought that since DefaultServlet was serving static content that it would. I'm using Jetty to host my Maven-generated site (static content) and in order to site:deploy updated files over the old ones we have to use org.mortbay.jetty.bio.SocketConnector instead of the NIO connectors in our version of jetty.xml. That is pretty obvious from the comments here and in the config file, but I thought this comment might help some other new users to use Jetty this way on Windows. > NIO memory mapped files keep static content write-locked on Windows > ------------------------------------------------------------------- > > Key: JETTY-60 > URL: http://jira.codehaus.org/browse/JETTY-60 > Project: Jetty > Issue Type: Bug > Components: NIO > Affects Versions: 6.0.0beta15 > Environment: Windows XP, Java 1.5 > Reporter: George Van Treeck > Assigned To: Jan Bartel > Priority: Minor > > Memory mapped of NIO puts a lock on files on Windows. When Jetty sends a static file to a browser and an application subsequently tries to delete (replace that file), I get the following error message: > Cause: java.io.FileNotFoundException: C:\Documents and Settings\george\My Documents\...\work\temp\temp.html (The requested operation cannot be performed on a file with a user-mapped section open) > If I use the org.mortbay.jetty.bio.SocketConnector, then it works correctly (able to rewrite a static file). The problem only occurs with the NIO classes: org.mortbay.jetty.nio.SelectChannelConnector and org.mortbay.jetty.nio.BlockingChannelConnector. > Maybe this is one of those inescapable design tradeoffs of NIO. If so, then it should be documented. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |