Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Wilkins2013-06-17 00:21:40 -0400
committerGreg Wilkins2013-06-17 00:21:53 -0400
commit9bf7870c7c8a209f2660f63c14dd4acb62b07533 (patch)
treef51b9667f6b6758c47d2f57528a0eb96448f357e
parent1908fff38fe66c40382ec4ff404b21637bf10efb (diff)
downloadorg.eclipse.jetty.project-9bf7870c7c8a209f2660f63c14dd4acb62b07533.tar.gz
org.eclipse.jetty.project-9bf7870c7c8a209f2660f63c14dd4acb62b07533.tar.xz
org.eclipse.jetty.project-9bf7870c7c8a209f2660f63c14dd4acb62b07533.zip
410893 async support defaults to false for spec created servlets and filters
-rw-r--r--jetty-servlet/src/main/java/org/eclipse/jetty/servlet/FilterHolder.java9
-rw-r--r--jetty-servlet/src/main/java/org/eclipse/jetty/servlet/Holder.java12
-rw-r--r--jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHandler.java2
-rw-r--r--jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHolder.java12
4 files changed, 22 insertions, 13 deletions
diff --git a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/FilterHolder.java b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/FilterHolder.java
index 2afebab93c..121c27257e 100644
--- a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/FilterHolder.java
+++ b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/FilterHolder.java
@@ -53,16 +53,15 @@ public class FilterHolder extends Holder<Filter>
*/
public FilterHolder()
{
- super (Source.EMBEDDED);
+ this(Source.EMBEDDED);
}
-
/* ---------------------------------------------------------------- */
/** Constructor
*/
public FilterHolder(Holder.Source source)
{
- super (source);
+ super(source);
}
/* ---------------------------------------------------------------- */
@@ -70,7 +69,7 @@ public class FilterHolder extends Holder<Filter>
*/
public FilterHolder(Class<? extends Filter> filter)
{
- super (Source.EMBEDDED);
+ this(Source.EMBEDDED);
setHeldClass(filter);
}
@@ -79,7 +78,7 @@ public class FilterHolder extends Holder<Filter>
*/
public FilterHolder(Filter filter)
{
- super (Source.EMBEDDED);
+ this(Source.EMBEDDED);
setFilter(filter);
}
diff --git a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/Holder.java b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/Holder.java
index f9dd20cd06..f955213fb2 100644
--- a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/Holder.java
+++ b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/Holder.java
@@ -54,7 +54,7 @@ public class Holder<T> extends AbstractLifeCycle implements Dumpable
protected String _className;
protected String _displayName;
protected boolean _extInstance;
- protected boolean _asyncSupported=true;
+ protected boolean _asyncSupported;
/* ---------------------------------------------------------------- */
protected String _name;
@@ -64,6 +64,16 @@ public class Holder<T> extends AbstractLifeCycle implements Dumpable
protected Holder(Source source)
{
_source=source;
+ switch(_source)
+ {
+ case JAVAX_API:
+ case DESCRIPTOR:
+ case ANNOTATION:
+ _asyncSupported=false;
+ break;
+ default:
+ _asyncSupported=true;
+ }
}
public Source getSource()
diff --git a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHandler.java b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHandler.java
index 1cabbc99ba..14e5fe054c 100644
--- a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHandler.java
+++ b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHandler.java
@@ -825,7 +825,7 @@ public class ServletHandler extends ScopedHandler
*/
public ServletHolder addServletWithMapping (String className,String pathSpec)
{
- ServletHolder holder = newServletHolder(null);
+ ServletHolder holder = newServletHolder(Holder.Source.EMBEDDED);
holder.setName(className+"-"+LazyList.size(_servlets));
holder.setClassName(className);
addServletWithMapping(holder,pathSpec);
diff --git a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHolder.java b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHolder.java
index 509a04af63..9dfbcc8a0a 100644
--- a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHolder.java
+++ b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHolder.java
@@ -90,7 +90,7 @@ public class ServletHolder extends Holder<Servlet> implements UserIdentity.Scope
*/
public ServletHolder()
{
- super (Source.EMBEDDED);
+ this(Source.EMBEDDED);
}
/* ---------------------------------------------------------------- */
@@ -98,7 +98,7 @@ public class ServletHolder extends Holder<Servlet> implements UserIdentity.Scope
*/
public ServletHolder(Holder.Source creator)
{
- super (creator);
+ super(creator);
}
/* ---------------------------------------------------------------- */
@@ -106,7 +106,7 @@ public class ServletHolder extends Holder<Servlet> implements UserIdentity.Scope
*/
public ServletHolder(Servlet servlet)
{
- super (Source.EMBEDDED);
+ this(Source.EMBEDDED);
setServlet(servlet);
}
@@ -115,7 +115,7 @@ public class ServletHolder extends Holder<Servlet> implements UserIdentity.Scope
*/
public ServletHolder(String name, Class<? extends Servlet> servlet)
{
- super (Source.EMBEDDED);
+ this(Source.EMBEDDED);
setName(name);
setHeldClass(servlet);
}
@@ -125,7 +125,7 @@ public class ServletHolder extends Holder<Servlet> implements UserIdentity.Scope
*/
public ServletHolder(String name, Servlet servlet)
{
- super (Source.EMBEDDED);
+ this(Source.EMBEDDED);
setName(name);
setServlet(servlet);
}
@@ -135,7 +135,7 @@ public class ServletHolder extends Holder<Servlet> implements UserIdentity.Scope
*/
public ServletHolder(Class<? extends Servlet> servlet)
{
- super (Source.EMBEDDED);
+ this(Source.EMBEDDED);
setHeldClass(servlet);
}

Back to the top