Tomcat automatic persistent session generation problem

xiaoxiao2021-03-06  14

When Tomcat provides a shut-off or unload server, the function of automatically saving the server session status is automatically saved, and the session.ser file is created under the corresponding path in the Work directory stores the SESSION data of the webApp. But I have trouble because of this function. In my web application, if the object is saved in the session, turn off the Tomcat service at this time, then start the Tomcat service, the console information throws an exception, saying in recovery the session object When an error occurs, the abnormal information can't find DataSource, and this exception appears before the load of any WebApp, it is very wonderful. The analysis may be due to the time of Tomcat recovery, the object reference in the session may be related to the database operation. At this time, DataSource is not initialized, so that the error is created, so that the information is blocked, the problem is solved.

By default, the web application published under Tomcat5, if the SESSION operation is involved, when Tomcat5 is closed or undeploy, the session.ser file will be created under the corresponding path in the Work directory to store the WebApp's session data. In the session timeout, Tomcat restarts or RE-Deploy will load the data in the file, restore the user's original session running environment.

See below:

From http://blog.9cbs.net/zhaozexin/archive/2005/02/18/293184.aspx

D: /jakarta-tomcat-5.5.8/conf/context.xml Modified here You can also: 转载请注明原文地址:https://www.9cbs.com/read-50752.html


New Post(0)