This persistence type is not designed for a production environment that requires session persistence. It provides no session persistence. However, for web applications only, you can configure it so that the session state in memory is written to the file system prior to server shutdown.
To specify the memory persistence type for the entire web container, use the configure-ha-persistence command. For details, see the Sun GlassFish Communications Server 2.0 Reference Manual.
To specify the memory persistence type for a specific web or SIP application, edit the sun-web.xml or sun-sip.xml file as in the following example. The persistence-type property is optional, but must be set to memory if included. This overrides the web container availability settings for the web application.
<sun-web-app> ... <session-config> <session-manager persistence-type="memory" /> <manager-properties> <property name="sessionFilename" value="sessionstate" /> </manager-properties> </session-manager> ... </session-config> ... </sun-web-app>
The only manager property that the memory persistence type supports is sessionFilename, which is listed under manager-properties in Sun GlassFish Communications Server 2.0 Application Deployment Guide. This property does not apply to SIP applications.
For more information about the sun-web.xml or sun-sip.xml file, see Sun GlassFish Communications Server 2.0 Application Deployment Guide.