Sun Java System Application Server Platform Edition 8.1 2005Q2 Update 2 Developer's Guide

- Previous: Configuring Sessions
- Next: The file Persistence Type

### The memory Persistence Type

This persistence type is not designed for a production environment that requires session persistence. It provides no session persistence. However, 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 Java System Application Server Platform Edition 8.1 2005Q2 Update 2 Reference Manual.

To specify the `memory` persistence type for a specific web application, edit the `sun-web.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.

For more information about the `sun-web.xml` file, see The sun-web.xml File.

- Previous: Configuring Sessions
- Next: The file Persistence Type

- © 2010, Oracle Corporation and/or its affiliates