Merge branch 'master' of ssh://git.eclipse.org/gitroot/jetty/org.eclipse.jetty.project

This commit is contained in:
Jan Bartel 2013-06-17 16:54:47 +10:00
commit 6b9742ff86
5 changed files with 33 additions and 14 deletions

View File

@ -166,7 +166,17 @@ public class Servlet3Continuation implements Continuation
@Override @Override
public boolean isSuspended() public boolean isSuspended()
{ {
return _request.isAsyncStarted(); if (_request.isAsyncStarted())
return true;
try
{
return _request.getAsyncContext()!=null;
}
catch(IllegalStateException e)
{
// ignored
}
return false;
} }
/* ------------------------------------------------------------ */ /* ------------------------------------------------------------ */

View File

@ -570,8 +570,6 @@ public class HttpChannelState
switch(_state) switch(_state)
{ {
case ASYNCSTARTED: case ASYNCSTARTED:
case REDISPATCHING:
case COMPLETECALLED:
case ASYNCWAIT: case ASYNCWAIT:
return true; return true;

View File

@ -53,7 +53,7 @@ public class FilterHolder extends Holder<Filter>
*/ */
public FilterHolder() public FilterHolder()
{ {
super (Source.EMBEDDED); this(Source.EMBEDDED);
} }
@ -70,7 +70,7 @@ public class FilterHolder extends Holder<Filter>
*/ */
public FilterHolder(Class<? extends Filter> filter) public FilterHolder(Class<? extends Filter> filter)
{ {
super (Source.EMBEDDED); this(Source.EMBEDDED);
setHeldClass(filter); setHeldClass(filter);
} }
@ -79,7 +79,7 @@ public class FilterHolder extends Holder<Filter>
*/ */
public FilterHolder(Filter filter) public FilterHolder(Filter filter)
{ {
super (Source.EMBEDDED); this(Source.EMBEDDED);
setFilter(filter); setFilter(filter);
} }

View File

@ -57,7 +57,7 @@ public class Holder<T> extends AbstractLifeCycle implements Dumpable
protected String _className; protected String _className;
protected String _displayName; protected String _displayName;
protected boolean _extInstance; protected boolean _extInstance;
protected boolean _asyncSupported=true; protected boolean _asyncSupported;
/* ---------------------------------------------------------------- */ /* ---------------------------------------------------------------- */
protected String _name; protected String _name;
@ -67,8 +67,19 @@ public class Holder<T> extends AbstractLifeCycle implements Dumpable
protected Holder(Source source) protected Holder(Source source)
{ {
_source=source; _source=source;
switch(_source)
{
case JAVAX_API:
case DESCRIPTOR:
case ANNOTATION:
_asyncSupported=false;
break;
default:
_asyncSupported=true;
}
} }
/* ------------------------------------------------------------ */
public Source getSource() public Source getSource()
{ {
return _source; return _source;

View File

@ -93,7 +93,7 @@ public class ServletHolder extends Holder<Servlet> implements UserIdentity.Scope
*/ */
public ServletHolder() public ServletHolder()
{ {
super (Source.EMBEDDED); this(Source.EMBEDDED);
} }
/* ---------------------------------------------------------------- */ /* ---------------------------------------------------------------- */
@ -109,7 +109,7 @@ public class ServletHolder extends Holder<Servlet> implements UserIdentity.Scope
*/ */
public ServletHolder(Servlet servlet) public ServletHolder(Servlet servlet)
{ {
super (Source.EMBEDDED); this(Source.EMBEDDED);
setServlet(servlet); setServlet(servlet);
} }
@ -118,7 +118,7 @@ public class ServletHolder extends Holder<Servlet> implements UserIdentity.Scope
*/ */
public ServletHolder(String name, Class<? extends Servlet> servlet) public ServletHolder(String name, Class<? extends Servlet> servlet)
{ {
super (Source.EMBEDDED); this(Source.EMBEDDED);
setName(name); setName(name);
setHeldClass(servlet); setHeldClass(servlet);
} }
@ -128,7 +128,7 @@ public class ServletHolder extends Holder<Servlet> implements UserIdentity.Scope
*/ */
public ServletHolder(String name, Servlet servlet) public ServletHolder(String name, Servlet servlet)
{ {
super (Source.EMBEDDED); this(Source.EMBEDDED);
setName(name); setName(name);
setServlet(servlet); setServlet(servlet);
} }
@ -138,7 +138,7 @@ public class ServletHolder extends Holder<Servlet> implements UserIdentity.Scope
*/ */
public ServletHolder(Class<? extends Servlet> servlet) public ServletHolder(Class<? extends Servlet> servlet)
{ {
super (Source.EMBEDDED); this(Source.EMBEDDED);
setHeldClass(servlet); setHeldClass(servlet);
} }