Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Wilkins2015-09-11 02:06:23 +0000
committerGreg Wilkins2015-09-11 02:06:23 +0000
commit02c5ea30be86112f351cf3d4ad93977479101a2e (patch)
treea9e528fc31e10ff78f38afd9b38f308396a46d55 /jetty-deploy/src
parent7957ed06efd765943701d6c1c6c6496734df3470 (diff)
downloadorg.eclipse.jetty.project-02c5ea30be86112f351cf3d4ad93977479101a2e.tar.gz
org.eclipse.jetty.project-02c5ea30be86112f351cf3d4ad93977479101a2e.tar.xz
org.eclipse.jetty.project-02c5ea30be86112f351cf3d4ad93977479101a2e.zip
477123 - AsyncListener callbacks need context scope
Also added DebugListener and deprecated DebugHandler
Diffstat (limited to 'jetty-deploy/src')
-rw-r--r--jetty-deploy/src/main/java/org/eclipse/jetty/deploy/bindings/DebugListenerBinding.java53
-rw-r--r--jetty-deploy/src/main/java/org/eclipse/jetty/deploy/providers/WebAppProvider.java2
2 files changed, 54 insertions, 1 deletions
diff --git a/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/bindings/DebugListenerBinding.java b/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/bindings/DebugListenerBinding.java
new file mode 100644
index 0000000000..cc8698cf50
--- /dev/null
+++ b/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/bindings/DebugListenerBinding.java
@@ -0,0 +1,53 @@
+//
+// ========================================================================
+// Copyright (c) 1995-2015 Mort Bay Consulting Pty. Ltd.
+// ------------------------------------------------------------------------
+// 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.opensource.org/licenses/apache2.0.php
+//
+// 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.graph.Node;
+import org.eclipse.jetty.server.DebugListener;
+
+
+/** A Deployment binding that installs a DebugListener in all deployed contexts
+ */
+public class DebugListenerBinding extends DebugBinding
+{
+ final DebugListener _debugListener;
+
+ public DebugListenerBinding()
+ {
+ this(new DebugListener());
+ }
+
+ public DebugListenerBinding(DebugListener debugListener)
+ {
+ super(new String[]{"deploying"});
+ _debugListener=debugListener;
+ }
+
+ public DebugListener getDebugListener()
+ {
+ return _debugListener;
+ }
+
+ public void processBinding(Node node, App app) throws Exception
+ {
+ app.getContextHandler().addEventListener(_debugListener);
+ }
+
+}
diff --git a/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/providers/WebAppProvider.java b/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/providers/WebAppProvider.java
index 5cda93f2db..91f70c9539 100644
--- a/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/providers/WebAppProvider.java
+++ b/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/providers/WebAppProvider.java
@@ -257,7 +257,7 @@ public class WebAppProvider extends ScanningAppProvider
if (resource.exists() && FileID.isXmlFile(file))
{
- XmlConfiguration xmlc = new XmlConfiguration(resource.getURL())
+ XmlConfiguration xmlc = new XmlConfiguration(resource.getURI().toURL())
{
@Override
public void initializeDefaults(Object context)

Back to the top