There is a workaround to this problem. Create a META-INF/context.xml file in your webapp, with the following content:
<Context>
<Manager pathname="${catalina.base}/sessions/example.ser"/>
</Context>
when the application stop or undeploy the file is created and disapper when resumed.