Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 6.0.0beta15
-
Fix Version/s: None
-
Component/s: NIO
-
Labels:None
-
Environment:Windows XP, Java 1.5
-
Number of attachments :
Description
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.
Same error from today snapshot build, most probably beta16.