A client asked me to use sessions to save in database, but not in the server.
Client’s servers are 4 WAS servers, 12 DB Servers and 8 File Servers. They are all seperated servers and located in different location.
Since the user could jump to A WAS server to B WAS server, they wanted the session to be saved in the database, since it is more easier to get user’s info.
But I have no clue at all of how to get and save the sessions to the database.
Is there any ways to do it? Any references? Any books? I seriously need help!
You can have a boolean attribute for each user, something like ‘isLoggedIn’ . Using filters or interceptors, for every request you can check if he is already logged in or not. But, this process would make your application slow.
There are caches available which support clustering like Hazelcast cache. So, you can point all your WAS servers to a common hazelcast cache and store user login info in cache, instead of database, which will greatly increase the speed of your application.