Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #24228 Removed redundant pid file removal, faster checking
- The file is removed twice while it is used to check if the instance is still running. - faster check to increase probability of issues if there are some - and also to be really faster :-) - Local testing: start: 2200-2500 ms, stop: 30-40 ms. - Added log for failures. - The javadoc was not right, it is not possible in current Java versions with the current GlassFish implementation, but it is possible to avoid hooks by using SIGKILL signal. But that isn't an issue any more, because since GF7 we use ProcessHandles to check if the process is running, while old versions used commands of the operating system. - However, I am still not sure if this is enough to resolve the issue, because Felix really writes to the osgi cache until the real end. But JVM hooks are executed AFTER parallely executed application hooks and the DeleteOnExitHook should be the last one. That should remove the pid file. Then asadmin command checks if it exists or not, if it exists, it loads it's content and checks handles if the process is alive or not. On startup it checks the same, so there is no problem. - Tested CTRL+C, SIGKILL, pid, stop, --force, --kill, restart-domain, everything works now. Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
- Loading branch information
Showing
3 changed files
with
39 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters