diff --git a/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/DeploymentManager.java b/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/DeploymentManager.java index 2bd8e903722..a52f1fb678f 100644 --- a/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/DeploymentManager.java +++ b/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/DeploymentManager.java @@ -28,6 +28,7 @@ import org.eclipse.jetty.deploy.bindings.StandardDeployer; import org.eclipse.jetty.deploy.bindings.StandardStarter; import org.eclipse.jetty.deploy.bindings.StandardStopper; import org.eclipse.jetty.deploy.bindings.StandardUndeployer; +import org.eclipse.jetty.deploy.graph.Edge; import org.eclipse.jetty.deploy.graph.Node; import org.eclipse.jetty.deploy.graph.Path; import org.eclipse.jetty.server.Server; @@ -149,6 +150,21 @@ public class DeploymentManager extends AbstractLifeCycle lifecycle.addBinding(binding); } + /** + * Convenience method to allow for insertion of nodes into the lifecycle. + * + * @param existingFromNodeName + * @param existingToNodeName + * @param insertedNodeName + */ + public void insertLifeCycleNode(String existingFromNodeName, String existingToNodeName, String insertedNodeName) + { + Node fromNode = lifecycle.getNodeByName(existingFromNodeName); + Node toNode = lifecycle.getNodeByName(existingToNodeName); + Edge edge = new Edge(fromNode,toNode); + lifecycle.insertNode(edge,insertedNodeName); + } + @Override protected void doStart() throws Exception { diff --git a/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/providers/MonitoredDirAppProvider.java b/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/providers/MonitoredDirAppProvider.java index 1b006adc641..e7cb909dd16 100644 --- a/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/providers/MonitoredDirAppProvider.java +++ b/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/providers/MonitoredDirAppProvider.java @@ -211,7 +211,6 @@ public class MonitoredDirAppProvider extends AbstractLifeCycle implements AppPro this.scanner.setRecursive(recursive); this.scanner.setFilenameFilter(filenamefilter); this.scanner.addListener(this); - this.scanner.scan(); this.scanner.start(); Log.info("Started scanner: " + scanner); }