OpenNTF / openliberty-domino

Open Liberty server embedded in Domino
Apache License 2.0
7 stars 3 forks source link

Updated dropin deployment doesn't work on Windows while running #24

Closed jesse-gallagher closed 3 years ago

jesse-gallagher commented 5 years ago

This is because of how Windows file locking works. Liberty retains a lock on the file while it's running, and so it leads to NIO problems:

[0F10:0007-1360] 08/18/2019 04:57:38 PM  WLP: SEVERE Encountered exception when deploying dropin: java.nio.file.FileSystemException: C:\Domino\wlp\wlp-19.0.0.7\usr\servers\testServer\dropins\openliberty-domino-proxy.war: The process cannot access the file because it is being used by another process.

I'm not sure if there's a good way to fix this. Maybe use File#deleteOnExit on the old file and deploy with a unique name and hope that works. Slightly better could be to do that but also add a flag to delete the file when the runtime is issued a STOP command.

jesse-gallagher commented 4 years ago

In local testing now, this seems to have improved - it could be that newer builds of Liberty no longer retain locks on dropin WAR files. I'll keep an eye on this, but it may be safe to close.

jesse-gallagher commented 3 years ago

Obviated by https://github.com/OpenNTF/openliberty-domino/issues/59