java - How to kill previous HttpRequest for a user session in a HttpServlet -


is there way locate previous httprequest, given session?

web client sends request long running web service. while service running client sends request. want locate first request , send stop signal.

background: have web service requires 2-4 seconds process. servlet hosted in tomcat container , using osgi access main processor in plugin.

the requests come web site allows users make 10 or requests @ time. while user waiting may make page change start 10 web requests. need way locate previous requests. i'll find way send stop signal long running process allow original httprequest finish suitable error code.

perhaps way @ problem say: if client makes series of requests overlap want service last request , cancel previous requests possible.

i don't think httpsession gives looking for, recommend making kind of object requests can periodically check see if "newest" request. if no longer newest request can stop , return immediately.


Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -