Comments (11)
@glassfishrobot Commented
rstoyanchev said:
As one example of why this matters consider the SockJS protocol that provides HTTP fallback options for WebSocket.
The protocol does not define any client-side "close" frame. It expects the server will detect when the HTTP connection is closed and indeed a variety of server-side implementations in a range of languages (node, erlang, python, ruby) do.
A Java implementation – with Servlet 3 async for the long polling or HTTP streaming – however cannot detect when a client has gone away. This is a very fundamental, missing feature that puts Java Servlet-based implementations at a significant disadvantage.
from servlet.
@glassfishrobot Commented
ash2k said:
Because this feature is missing it is not possible to stop resource consuming computations on server if client disconnects. Please, see this ticket for example https://sourceforge.net/apps/trac/bigdata/ticket/694
from servlet.
@glassfishrobot Commented
@shingwaichan said:
There is no way to know when the socket is closed from SE API.
from servlet.
@glassfishrobot Commented
jfarcand said:
I disagree. Any NIO layer can detect when the underlying connection is getting closed. Look at Grizzly/Tomcat NIO/Netty, they all able to handle that case.
from servlet.
I think such a new API is out of scope for 5.1... however we should clarify our existing APIs in similar circumstances such as clarifications of HTTP/2 behaviour with regards to async calls to onError etc. discussed in #256
from servlet.
- Issue Imported From: https://github.com/javaee/servlet-spec/issues/44
- Original Issue Raised By:@glassfishrobot
- Original Issue Assigned To: @shingwaichan
from servlet.
@glassfishrobot Commented
Reported by jitu
from servlet.
@glassfishrobot Commented
@mpotociar said:
onDisconnect(...) would be a better name IMO. Also, if that's not possible due to the lack of JavaSE Socket API, should it be clarified that onError(...) could be used for that purpose?
from servlet.
@glassfishrobot Commented
@shingwaichan said:
java.nio.channels.Channel#isOpen tests whether or not the channel is open.
So, we will revisit the issue.
from servlet.
@glassfishrobot Commented
rstoyanchev said:
Adding a link to a discussion on Tomcat's user list.
from servlet.
@glassfishrobot Commented
This issue was imported from java.net JIRA SERVLET_SPEC-44
from servlet.
Related Issues (20)
- Some ServletContext getters still throw UnsupportedOperationException HOT 1
- TCK Challenge: Cookie setMaxAgePositiveTest using incorrect CookiePolicy for Date parsing HOT 8
- TCK Challenge: doHeadTest shouldn't validate optional payload header fields HOT 7
- TCK Challenge: isTrailerFields JavaDoc and default implementation inconsistent HOT 7
- Add read/write from/to ByteBuffer HOT 1
- [TCK Challenge] invalidateHttpSessionxTest HOT 4
- [TCK Challenge] A number of cross context HTTP session tests are failing HOT 14
- [TCK Challenge] dispatchAfterCommitTest4 HOT 2
- [TCK Challenge] dispatchAfterCommitTest5 HOT 5
- [TCK Challenge] object identity test on ServletRequests in listeners vs servlets HOT 6
- [TCK Challenge] inconsistent testing of cookies HOT 7
- Is the maintenance plan updated for jakarta servlet-4.0.x? HOT 3
- Add PATCH support in HttpServlet.java HOT 3
- Session 9 (Dispatching Requests) is missing information on jakarta.servlet.*.mapping request attributes
- HttpServletRequest and changes to attributes event HOT 1
- ServletContext - getContext(String uripath) method confusing javadoc HOT 4
- [TCK Challenge] check for object identity in dispatcher test HOT 2
- [TCK Challenge] attempting to writing more than content-length bytes HOT 1
- License oddities in `jakarta.servlet-api-6.0.0.jar`
- Couldn't resolve specified result-set mapping name HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from servlet.