I have a web application using spring/hibernate. i have a requirement. i am keeping some info in session. Before the session gets timed out, i need to take back up of all the session objects and again i need to put the session objects back into the session once new session gets created. Once the session is timed out, user wil be shown the login page and once the user is logged in, i need to get the stored session information of the logged in user from the back up and keep in the session.
Two achieve above things i need to implement HttpSessionListener. In one stretch how can i take the back up of all the session objects of all the users logged in. Once new session gets created then again i neeed to take the session objects of logged in user from the back up and keep in the session. Please suggest me the approaches.
public class MySessionListener implements HttpSessionListener {
@Override
public void sessionCreated(HttpSessionEvent event) {
}
@Override
public void sessionDestroyed(HttpSessionEvent event) {
}
}