Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Wilkins2010-11-10 16:04:14 -0500
committerGreg Wilkins2010-11-10 16:04:14 -0500
commit095d728f315c08661364115dec20bc1be992bd5c (patch)
tree44898075178dd9b78b2ddd0b20d5d246123ca1dc /jetty-deploy/src/main
parent834e0ef1d8ace824a5697ccd5b3d886f01be34fb (diff)
downloadorg.eclipse.jetty.project-095d728f315c08661364115dec20bc1be992bd5c.tar.gz
org.eclipse.jetty.project-095d728f315c08661364115dec20bc1be992bd5c.tar.xz
org.eclipse.jetty.project-095d728f315c08661364115dec20bc1be992bd5c.zip
improved help and debugging
git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@2490 7e9141cc-0065-0410-87d8-b60c137991c4
Diffstat (limited to 'jetty-deploy/src/main')
-rw-r--r--jetty-deploy/src/main/config/etc/jetty-deploy.xml18
-rw-r--r--jetty-deploy/src/main/java/org/eclipse/jetty/deploy/bindings/DebugBinding.java47
2 files changed, 65 insertions, 0 deletions
diff --git a/jetty-deploy/src/main/config/etc/jetty-deploy.xml b/jetty-deploy/src/main/config/etc/jetty-deploy.xml
index 199eeb5d65..ebbec50932 100644
--- a/jetty-deploy/src/main/config/etc/jetty-deploy.xml
+++ b/jetty-deploy/src/main/config/etc/jetty-deploy.xml
@@ -24,6 +24,24 @@
<Arg>org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern</Arg>
<Arg>.*/jsp-api-[^/]*\.jar$|.*/jsp-[^/]*\.jar$</Arg>
</Call>
+
+
+ <!-- Add a customize step to the deployment lifecycle -->
+ <!-- uncomment and replace DebugBinding with your extended AppLifeCycle.Binding class
+ <Call name="insertLifeCycleNode">
+ <Arg>deployed</Arg>
+ <Arg>starting</Arg>
+ <Arg>customise</Arg>
+ </Call>
+ <Call name="addLifeCycleBinding">
+ <Arg>
+ <New class="org.eclipse.jetty.deploy.bindings.DebugBinding">
+ <Arg>customise</Arg>
+ </New>
+ </Arg>
+ </Call>
+ -->
+
</New>
</Arg>
</Call>
diff --git a/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/bindings/DebugBinding.java b/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/bindings/DebugBinding.java
new file mode 100644
index 0000000000..69d45d084f
--- /dev/null
+++ b/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/bindings/DebugBinding.java
@@ -0,0 +1,47 @@
+// ========================================================================
+// Copyright (c) Webtide LLC
+// ------------------------------------------------------------------------
+// All rights reserved. This program and the accompanying materials
+// are made available under the terms of the Eclipse Public License v1.0
+// and Apache License v2.0 which accompanies this distribution.
+//
+// The Eclipse Public License is available at
+// http://www.eclipse.org/legal/epl-v10.html
+//
+// The Apache License v2.0 is available at
+// http://www.apache.org/licenses/LICENSE-2.0.txt
+//
+// You may elect to redistribute this code under either of these licenses.
+// ========================================================================
+package org.eclipse.jetty.deploy.bindings;
+
+import org.eclipse.jetty.deploy.App;
+import org.eclipse.jetty.deploy.AppLifeCycle;
+import org.eclipse.jetty.deploy.graph.Node;
+import org.eclipse.jetty.server.handler.ContextHandler;
+import org.eclipse.jetty.util.log.Log;
+
+public class DebugBinding implements AppLifeCycle.Binding
+{
+ final String[] _targets;
+
+ public DebugBinding(String target)
+ {
+ _targets=new String[]{target};
+ }
+
+ public DebugBinding(final String... targets)
+ {
+ _targets=targets;
+ }
+
+ public String[] getBindingTargets()
+ {
+ return _targets;
+ }
+
+ public void processBinding(Node node, App app) throws Exception
+ {
+ Log.info("processBinding {} {}",node,app.getContextHandler());
+ }
+}

Back to the top