-1

I have a spring 3 project, and I now need to share session among multiple server instance. Naturally, I thought about mongoDB, I want to use MongoDB as session storage for Spring project. But I googled a lot, and I can only find reference for Spring boot application, there is NO documentation telling me how to use mongoDB as sessionStorage for Spring 3.1.2 project.

Can anyone help to refer some good material telling me how to use mongoDB as session storage for Spring 3.1.2 project?

Thanks in advance.

user3006967
  • 3,291
  • 10
  • 47
  • 72

1 Answers1

0

Basically you want to issue your clients unique identifiers (UUIDs/IDs of any kind) and save any data you want to any DB you want by this unique ID. On subsequent requests you extract the ID the client sends back to your server via cookies/headers/HTTP parameters/whatever. You look up you "session" information in DB by this ID and use it in any manner.

serg.nechaev
  • 1,323
  • 19
  • 26
  • Thanks. But what I am looking for is something like this: http://docs.spring.io/spring-session/docs/current/reference/html5/guides/mongo.html, but for Spring 3.x – user3006967 Aug 16 '16 at 15:10