Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Set JarURLConnection.useCaches to false in Compiler.isOutDated(). #42

Merged

Conversation

kaido207
Copy link
Contributor

The jar file included in the JSP application remains locked if JarURLConnection.useCaches is true when the connection is closed.
https://github.com/openjdk/jdk/blob/739769c8fc4b496f08a92225a12d07414537b6c0/src/java.base/share/classes/sun/net/www/protocol/jar/JarURLConnection.java#L105-#L118
In Windows, user cannot remove the file until restarting JVM.

Signed-off-by: kaido207 kaido.hiroki@fujitsu.com

Signed-off-by: kaido207 <kaido.hiroki@fujitsu.com>
@joakime
Copy link
Member

joakime commented Jan 13, 2022

IIRC, this changed again in Java 17, which uses zipfs instead of JarURLConnection for the classloader now.

@kaido207
Copy link
Contributor Author

@joakime This behavior remains the same in Java 17. so it should be addressed, especially for Jakarta EE 10, the minimum runtime version is Java 11.

@kaido207
Copy link
Contributor Author

Are there any other suggestions to merge this patch?

@arjantijms
Copy link
Contributor

Thanks @kaido207

@arjantijms arjantijms added this to the 3.1.0 milestone Apr 28, 2022
@arjantijms arjantijms merged commit 4a91274 into eclipse-ee4j:master Apr 28, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants