How to persist spring sessions into custom back-end data store
<p>I have a spring MVC web application, I have java classes that I have annotated with <code>@Scope("session")</code> and currently running it on tomcat. The classes annotated with the scope store user information that I don't want to lose in case the server crashes. So how do I persist the session together with all the flow information and the user data stored in the <code>@Scope("session")</code> beans into an external DB (a custom noSQL DB) so that when the server crashes, the user will seamlessly be transferred to another server and all the data and info and beans restored from the external DB to the new server without the user even noticing anything. I don't want to use tomcat persistence and I also don't want to use Redis.</p>