diff --git a/jetty-security/src/main/java/org/eclipse/jetty/security/AbstractLoginService.java b/jetty-security/src/main/java/org/eclipse/jetty/security/AbstractLoginService.java index 7e8ea64a9e0..7202a964439 100644 --- a/jetty-security/src/main/java/org/eclipse/jetty/security/AbstractLoginService.java +++ b/jetty-security/src/main/java/org/eclipse/jetty/security/AbstractLoginService.java @@ -153,7 +153,7 @@ public abstract class AbstractLoginService extends AbstractLifeCycle implements @Override public String toString() { - return this.getClass().getSimpleName()+"["+_name+"]"; + return String.format("%s@%x[%s]", this.getClass().getSimpleName(), hashCode(), _name); } diff --git a/jetty-security/src/main/java/org/eclipse/jetty/security/ConstraintSecurityHandler.java b/jetty-security/src/main/java/org/eclipse/jetty/security/ConstraintSecurityHandler.java index dfd9ab2290f..0bdc9ab15f8 100644 --- a/jetty-security/src/main/java/org/eclipse/jetty/security/ConstraintSecurityHandler.java +++ b/jetty-security/src/main/java/org/eclipse/jetty/security/ConstraintSecurityHandler.java @@ -767,13 +767,9 @@ public class ConstraintSecurityHandler extends SecurityHandler implements Constr @Override public void dump(Appendable out,String indent) throws IOException { - // TODO these should all be beans dumpBeans(out, indent, - getLoginService(), - getIdentityService(), - getAuthenticator(), - DumpableCollection.from("roles",_roles), - DumpableCollection.from("constraints",_constraintMappings)); + DumpableCollection.from("roles", _roles), + DumpableCollection.from("constraints", _constraintMappings)); } /* ------------------------------------------------------------ */ diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/DebugListener.java b/jetty-server/src/main/java/org/eclipse/jetty/server/DebugListener.java index 7df261f9918..8b11dde9228 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/DebugListener.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/DebugListener.java @@ -42,6 +42,7 @@ import org.eclipse.jetty.util.annotation.ManagedAttribute; import org.eclipse.jetty.util.annotation.ManagedObject; import org.eclipse.jetty.util.annotation.Name; import org.eclipse.jetty.util.component.AbstractLifeCycle; +import org.eclipse.jetty.util.component.Dumpable; import org.eclipse.jetty.util.log.Log; import org.eclipse.jetty.util.log.Logger; @@ -127,12 +128,16 @@ public class DebugListener extends AbstractLifeCycle implements ServletContextLi if (_dumpContext) { if (_out==null) + { handler.dumpStdErr(); + System.err.println(Dumpable.KEY); + } else { try { handler.dump(_out); + _out.println(Dumpable.KEY); } catch(Exception e) { diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandler.java b/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandler.java index 8d545573fe4..8d305757540 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandler.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandler.java @@ -679,7 +679,11 @@ public class ContextHandler extends ScopedHandler implements Attributes, Gracefu _durableListeners.add(listener); if (listener instanceof ContextScopeListener) + { _contextListeners.add((ContextScopeListener)listener); + if (__context.get()!=null) + ((ContextScopeListener)listener).enterScope(__context.get(),null,"Listener registered"); + } if (listener instanceof ServletContextListener) _servletContextListeners.add((ServletContextListener)listener); diff --git a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ListenerHolder.java b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ListenerHolder.java index b3aa0e4c845..c8ab56b5ffc 100644 --- a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ListenerHolder.java +++ b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ListenerHolder.java @@ -71,7 +71,6 @@ public class ListenerHolder extends BaseHolder _listener = listener; _extInstance=true; setHeldClass(_listener.getClass()); - setClassName(_listener.getClass().getName()); } diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/thread/QueuedThreadPool.java b/jetty-util/src/main/java/org/eclipse/jetty/util/thread/QueuedThreadPool.java index a35adc3c41d..57f1986cc57 100755 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/thread/QueuedThreadPool.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/thread/QueuedThreadPool.java @@ -20,7 +20,6 @@ package org.eclipse.jetty.util.thread; import java.io.IOException; import java.util.ArrayList; -import java.util.Collections; import java.util.List; import java.util.Set; import java.util.concurrent.BlockingQueue; @@ -625,11 +624,15 @@ public class QueuedThreadPool extends ContainerLifeCycle implements SizedThreadP } } - List jobs = Collections.emptyList(); if (isDetailedDump()) - jobs = new ArrayList<>(getQueue()); - - dumpBeans(out, indent, new DumpableCollection("threads",threads), new DumpableCollection("jobs", jobs)); + { + List jobs = new ArrayList<>(getQueue()); + dumpBeans(out, indent, new DumpableCollection("threads", threads), new DumpableCollection("jobs", jobs)); + } + else + { + dumpBeans(out, indent, new DumpableCollection("threads", threads)); + } } @Override