HI all,

I have a Spring RESTful application which has server and client. The client provide a login and searching interface, and the server verifies the user and does the query with a DB-like component. The requirement is that close DB connection unless there is no more user activity. Because we don't want make new connection for every query since it is quite slow. The question is how can I retrieve the user information to be used in server side so that deciding to close the connection or not. Spring Security?

Hope the question is clear, thanks a lot..