Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Wilkins2013-08-16 01:44:30 +0000
committerGreg Wilkins2013-08-16 01:44:30 +0000
commit669f26566fa20df9ab0207e941a55be5b442e8c1 (patch)
tree986b869e1b0c11d10b1ad758d75a4aefcfc3528d /jetty-deploy/src
parent4016ba571c9d819637a3d184cf4430badd64774b (diff)
parent2761abb6589d69b95df671c8838852fec238e049 (diff)
downloadorg.eclipse.jetty.project-669f26566fa20df9ab0207e941a55be5b442e8c1.tar.gz
org.eclipse.jetty.project-669f26566fa20df9ab0207e941a55be5b442e8c1.tar.xz
org.eclipse.jetty.project-669f26566fa20df9ab0207e941a55be5b442e8c1.zip
Merge remote-tracking branch 'origin/master' into jetty-9.1
Diffstat (limited to 'jetty-deploy/src')
-rw-r--r--jetty-deploy/src/main/java/org/eclipse/jetty/deploy/bindings/StandardStarter.java12
-rw-r--r--jetty-deploy/src/main/java/org/eclipse/jetty/deploy/bindings/StandardStopper.java12
2 files changed, 16 insertions, 8 deletions
diff --git a/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/bindings/StandardStarter.java b/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/bindings/StandardStarter.java
index 4915626264..bb4861035b 100644
--- a/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/bindings/StandardStarter.java
+++ b/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/bindings/StandardStarter.java
@@ -25,18 +25,22 @@ import org.eclipse.jetty.server.handler.ContextHandler;
public class StandardStarter implements AppLifeCycle.Binding
{
+ @Override
public String[] getBindingTargets()
{
return new String[]
{ "starting" };
}
+ @Override
public void processBinding(Node node, App app) throws Exception
{
ContextHandler handler = app.getContextHandler();
- if (!handler.isStarted())
- {
- handler.start();
- }
+
+ // start the handler
+ handler.start();
+
+ // After starting let the context manage state
+ app.getDeploymentManager().getContexts().manage(handler);
}
}
diff --git a/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/bindings/StandardStopper.java b/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/bindings/StandardStopper.java
index c92f4530cb..dae13e8611 100644
--- a/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/bindings/StandardStopper.java
+++ b/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/bindings/StandardStopper.java
@@ -25,18 +25,22 @@ import org.eclipse.jetty.server.handler.ContextHandler;
public class StandardStopper implements AppLifeCycle.Binding
{
+ @Override
public String[] getBindingTargets()
{
return new String[]
{ "stopping" };
}
+ @Override
public void processBinding(Node node, App app) throws Exception
{
ContextHandler handler = app.getContextHandler();
- if (!handler.isStopped())
- {
- handler.stop();
- }
+
+ // Before stopping, take back management from the context
+ app.getDeploymentManager().getContexts().unmanage(handler);
+
+ // Stop it
+ handler.stop();
}
}

Back to the top