Jetty 8,Servlet 3.0和后续版本 [英] Jetty 8, servlet 3.0 and continuations
本文介绍了Jetty 8,Servlet 3.0和后续版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Servlet 3.0异步I/O是否不需要Jetty的延续功能?
Is the continuation features of Jetty not needed with servlet 3.0 asychronous I/O?
有什么区别吗?或者作为开发人员我应该如何看待事情?有人可以详细说明这个话题吗?
Is there a difference or how should I as a developer see things? Can someone elaborate on this topic?
推荐答案
如果您知道自己一直在部署到Servlet 3.0兼容的容器,并且对异步Servlet API感到满意,那么就不需要Jetty延续.
If you know that you are always deploying to a Servlet 3.0 compliant container, and you are comfortable with the asynchronous servlet API, then there's no need for Jetty continuations.
延续给您的两件事是:
- 它们有一个(可以说是简单的)API.
- 它们(某种程度上)可移植到servlet 2.x容器中.
最后一点很清楚,continuation API在容器之间是可移植的,但是具有以下行为:
To be clear on this last point, the continuation API is portable between containers, but it has the following behaviour:
- 在Jetty 6、7或8上,它将使用Jetty的本机异步功能
- 在servlet 3.0容器上,它将使用异步servlet API
- 在其他(2.x)容器上,它将同步运行.
这篇关于Jetty 8,Servlet 3.0和后续版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文