-
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
Issue #10271 - Introduce jetty-pid.xml
#10272
Conversation
+ Have jetty.sh use --pid-file=<name> too Signed-off-by: Joakim Erdfelt <[email protected]>
Signed-off-by: Joakim Erdfelt <[email protected]>
jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java
Outdated
Show resolved
Hide resolved
jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java
Outdated
Show resolved
Hide resolved
jetty-util/src/main/java/org/eclipse/jetty/util/component/PidFileLifeCycleListener.java
Outdated
Show resolved
Hide resolved
jetty-util/src/main/java/org/eclipse/jetty/util/component/PidFileLifeCycleListener.java
Outdated
Show resolved
Hide resolved
jetty-util/src/main/java/org/eclipse/jetty/util/component/PidFileLifeCycleListener.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Joakim Erdfelt <[email protected]>
Signed-off-by: Joakim Erdfelt <[email protected]>
jetty-pid.xml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I now think the PID mechanism should be different from the started mechanism, as the PID relates to the process and not the server.
Thus I think it should not be a LifeCycleListener
and instead should be it's own shutdown hook. As soon as the hook is created, it should create the pid file and register a shutdown hook that will delete the file only as the JVM stops, which is technically unrelated to any stop/start/fails that the server might do.
jetty-util/src/main/java/org/eclipse/jetty/util/component/PidFileLifeCycleListener.java
Outdated
Show resolved
Hide resolved
I'll give that a whirl, in a different PR, to see how it looks. |
Signed-off-by: Joakim Erdfelt <[email protected]>
@gregw I reworked this PR (no new PR) to be based on Shutdown behaviors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks nice! Just comment at this stage, will review for approval once not a draft.
jetty-server/src/main/java/org/eclipse/jetty/server/PidFile.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Joakim Erdfelt <[email protected]>
Signed-off-by: Joakim Erdfelt <[email protected]>
Signed-off-by: Joakim Erdfelt <[email protected]>
jetty-util/src/main/java/org/eclipse/jetty/util/component/FileNoticeLifeCycleListener.java
Show resolved
Hide resolved
jetty-server/src/main/java/org/eclipse/jetty/server/PidFile.java
Outdated
Show resolved
Hide resolved
Moved Pid module & files to jetty-util Signed-off-by: Joakim Erdfelt <[email protected]>
Signed-off-by: Joakim Erdfelt <[email protected]>
Signed-off-by: Joakim Erdfelt <[email protected]>
Signed-off-by: Joakim Erdfelt <[email protected]>
…feCycleListener Signed-off-by: Joakim Erdfelt <[email protected]>
Signed-off-by: Joakim Erdfelt <[email protected]>
Signed-off-by: Joakim Erdfelt <[email protected]>
Signed-off-by: Joakim Erdfelt <[email protected]>
Signed-off-by: Joakim Erdfelt <[email protected]>
Signed-off-by: Joakim Erdfelt <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
New
jetty-pid.xml
, used byjetty.sh
functions similar tojetty-started.xml
and will have Jetty itself produce (and remove) a pid file based on configuration injetty.sh
(eg: the$JETTY_PID
value)