I created a Web Service that brings results in JSON format to java , but sometimes when the user makes a request to the Web Service the same hangs and interrupts the whole service, would like to know if there is possibility to create sessions for each user where if a user make a request and lock after a few minutes the session and closed?