Persistent-store
From Resin 3.0
(One intermediate revision by one user not shown) | |||
Line 1: | Line 1: | ||
− | [[Category:Configuration]] [[Category:Cluster]] | + | {{Cleanup}} [[Category:Configuration]] [[Category:Cluster]] |
The <persistent-store> configures persistent storage for distributed objects like sessions. The session-config must have a <use-persistent-store/> to use the store. | The <persistent-store> configures persistent storage for distributed objects like sessions. The session-config must have a <use-persistent-store/> to use the store. | ||
Line 28: | Line 28: | ||
!tag||description||default | !tag||description||default | ||
|- | |- | ||
− | |data-source||a configured <[database]>||required | + | |data-source||a configured <[[database]]>||required |
|} | |} | ||
Latest revision as of 21:20, 1 December 2011
This article requires cleanup and may refer to a legacy version of Resin.
Please visit http://www.caucho.com/documentation/ for the most up-to-date documentation. |
The <persistent-store> configures persistent storage for distributed objects like sessions. The session-config must have a <use-persistent-store/> to use the store.
tag | description | default |
---|---|---|
type | file, jdbc, or cluster | required |
init|persistent-store specific configuration |
Contents |
type="file"
The file store is suitable only for single-server configurations which want to persist the session start over server restarts. It is useful for development servers, letting you keep sessions across web-app restarts.
tag | description | default |
---|---|---|
path | the path to the persistence directory | required |
type="jdbc"
The jdbc store uses a database server to persist the sessions. Requires Resin Professional.
tag | description | default |
---|---|---|
data-source | a configured <database> | required |
type="cluster"
Uses TCP connections to replicate sessions across the cluster. Requires Resin Professional. In 3.0.20 and later, the sessions are backed up onto two servers, meaning any two servers can go down without loss of session information.
tag | description | default |
---|---|---|
path | a directory where the sessions will be stored | required |
triplicate | stores sessions on two backup servers | true (3.0.20 and later) |
Example
<resin xmlns="http://caucho.com/ns/resin"> <server> <cluster> <srun server-id="a" port="6810"/> <srun server-id="b" port="6811"/> <srun server-id="c" port="6812"/> </cluster> <persistent-store type="cluster"> <init path="file:/tmp/caucho/qa/session" triplicate="true"/> </persistent-store> <web-app-default> <session-config use-persistent-store="true"/> </web-app-default> <host id=> <web-app id='/'> </web-app> </host> </server> </resin>