-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ResourceHandler.setUseFileMapping(boolean)
option
#10852
Comments
@cowwoc how are you declaring your Base Resource? (code examples please) |
On Jetty 9 / Jetty 10 / Jetty 11 the On Jetty 12, the If you used On Jetty 12, the |
That makes sense, but how do I get When reading the following code, keep in mind that the file being locked is inside the
Does anything jump out at you? I am seeing
Thanks |
I should clarify that I am using Jetty 12.0.3 |
Thanks to you pointing me in the right direction, I discovered the following workaround:
Meaning, I just took I hope that's safe... That said, does it make sense to add a configuration option to do this without having to subclassing |
Yup, that's safe. |
The other option is to use the I'm going to rename this as an issue to add |
.setUseFileMapping(boolean)
option
.setUseFileMapping(boolean)
optionResourceHandler
could use a .setUseFileMapping(boolean)
option
Thank you! |
PR #11071 merged |
ResourceHandler
could use a .setUseFileMapping(boolean)
optionResourceHandler.setUseFileMapping(boolean)
option
Jetty Version
12.0.3
Jetty Environment
Windows 10
Java Version
JDK 21
Question
In the past, one had to set
useFileMappedBuffer=false
to avoid holding file locks on Windows, but this configuration option seems to be gone. I am using theHandler
API to serve static files. I don't use the servlet API at all.When I'm developing JS code, I run Jetty for the backend and esbuild-watch for the frontend. Every time the file changes, esbuild-watch tries to re-build it; unfortunately it seems that Jetty is holding a lock and I'm not sure how to get around this.
The text was updated successfully, but these errors were encountered: