We are using this configuration in our clustered application :
glassfish-web.xml :
<session-config>
<session-manager persistence-type="replicated">
<manager-properties>
<property name="persistenceFrequency" value="web-method" />
<property name="relaxCacheVersionSemantics" value="true" />
</manager-properties>
<store-properties>
<property name="persistenceScope" value="session" />
</store-properties>
</session-manager>
<session-properties />
<cookie-properties />
</session-config>
Session is stored and replicated by Glassfish, the problem is that if something goes wrong with the cluster and it needs to be restarted we are loosing all the Session and ViewState data.
Is there a way to plug an external storage like memcached or mysql to store Session and ViewState information to ensure we never loose our client data?
PS : We are extensively using @ManagedBean @ViewScoped and we really wish to keep view state in a safe place