Copy link to clipboard
Copied
I'm sure I've missed something. Is there a how to on what needs to be changed to maintain sessions during a restart of the server?
I've read Charlie Areharts presentation regarding this and he mentions that an understanding of Tomcat is helpful but I have found nothing that describes changes needed in Tomcat with a standard CF deployment. I added a file name to the Manager element in the XML file for CF
Appreciate any help with this.
Copy link to clipboard
Copied
Surely, it is impossible to maintain sessions during a restart of the ColdFusion server. At some point in the process, the server shuts down, and all current sessions are lost. When it restarts, it creates new session IDs that are different from any it created before. It may also be that I miss something in my understanding of your question.
Copy link to clipboard
Copied
BKBK wrote:
Surely, it is impossible to maintain sessions during a restart of the ColdFusion server. At some point in the process, the server shuts down, and all current sessions are lost. When it restarts, it creates new session IDs that are different from any it created before. It may also be that I miss something in my understanding of your question.
From the " Installing Adobe Coldfusion 10" pdf page 20;
Enabling persistent session
To persist a session after a Tomcat restart, do the following:
1 Open the cfroot\cfusion\runtime\conf\context.xml file.
2 Uncomment the Manager pathname node.
Note: Flex sessions are not persisted after a Tomcat restart.
Copy link to clipboard
Copied
Ah, the picture is clearer. Maintaining sessions in this way is a feature of Tomcat, rather than of ColdFusion. Therefore, when you talk of server, you strictly imply Tomcat and will have to do the configuration in Tomcat.
If you open the file cfroot\cfusion\runtime\conf\context.xml, you will find that said element, <Manager pathname="" />, is uncommented by default. That means that, by default, sessions are not persisted after Tomcat restarts. This fits in well with ColdFusion's own standard behaviour regarding sessions persisting after a restart: they don't.
Nevertheless, the ColdFusion documentation is rather confusing on this point. It misses the crucial point, namely, that, by default, Tomcat implements session persistence across restarts. When you create the configuration file \conf\context.xml and add the element <Manager pathname="" /> to it, you effectively disable session persistence across restarts. For more, see this Tomcat documentation.
You may find this Stackoverflow thread on session persistence useful. Having perused the subject and done some tests, I would advise you to use this form of session persistence with caution. I wouldn't yet include it in the software of a life-support machine. Like most of ColdFusion's newly integrated functionalities, it has yet to be extensively tried and tested.