dimanche 19 avril 2015

Change deferredResult http status code on timeout

I´m using deferredResult on Spring MVC, but using this code, the timeout still are sending back the http code 503 to the client.



future.onCompletion(new Runnable() {
@Override
public void run() {

if(future.isSetOrExpired()){
response.setStatus(HttpServletResponse.SC_NO_CONTENT);
}
}
});


Any idea what else to try?.


Regards.


1 commentaire: