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
Post a Comment