We have a standard J2EE/Struts internal web application that has been used in production for many years. We save many Java objects into HttpSession then retrieve them for one request to another. It works most times (maybe 99.9%) but occasionally it just can’t find any Java objects we saved in session for no reason so our application will crash. It looks like session is lost when it happens.
I found a possible solution in this article from IBM website:
https://www.ibm.com/docs/en/was/9.0.5?topic=sessions-configuring-database-session-persistence
I wonder what Java code changes we need to make in order to use this approach so that session objects can be saved into WebSphere database then retrieved later when session loss happens.
I appreciate if anyone can provide some sample code.
I have tried to figure out why Java HttpSession loss would happen in WebSphere occasionally but no luck so far since it is very rare. That’s why I am thinking about this saving session object into database approach.