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
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)
{
case ASYNCSTARTED:
case REDISPATCHING:
case COMPLETECALLED:
case ASYNCWAIT:
return true;

View File

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

View File

@ -57,7 +57,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;
@ -67,8 +67,19 @@ 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()
{
return _source;

View File

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