简体   繁体   中英

Jersey JAX-RS 1.0 request not completed with client timesout

We are using Jersey 1.6 on a RESTful Server, when a request is started, but takes to long and the client timesout (can be replicated with postman and cancelling request) the request is only partially completed and some but not all database calls are done, leaving the database in a inconsistant state. I thought REST servers, always complete the calls no matter what happens to the client, but this does not seem to be true here. No exceptions are logged in our logging system, what does Jersey do to a request if the client timesout?

I thought REST servers, always complete the calls no matter what happens to the client, but this does not seem to be true here.

This is incorrect assumption. REST describes just the way of interaction, it is still under service developer's responsibility to make the database changes consistent(transactional) if needed.

No exceptions are logged in our logging system, what does Jersey do to a request if the client timesout?

It will still send the response, but the client will ignore it due to timeout.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM