I have a spring MVC web application, I have Java classes that I annotated with @Scope("session")and am currently running it on tomcat. Classes annotated with a storage area for user information that I don’t want to lose in the event of a server failure. So, how do I save a session, along with all the flow information and user data stored in @Scope("session")beans, to an external database (noSQL user database), so that when the server crashes, the user will be transferred to another server without problems and all the data both information and beans are restored from the external database to the new server, even if the user does not notice anything. I do not want to use tomcat persistence, and I also do not want to use Redis.
source
share