2 Replies Latest reply on Oct 12, 2009 1:47 PM by Richard Taylor

    HTTP Session passivation during server restart?

    Richard Taylor Newbie

      I'd like to enable HTTP Session passivation so that all active sessions are passivated to disk during a graceful server restart. I'd like users to stay logged in through a server restart (single server). This is especially helpful in a development environment.

      JBoss 5.1.0
      JBoss Cache 3.2.1

      I've read the following and have followed the instructions:

      Session passivation works in the sense that when my specified time limits are hit, sessions are written to disk. However when I gracefully shut down the server, all passivated sessions are deleted from disk.

      In the section describing passivation being triggered by a server shutdown it says:

      If the session is valid, then it's passivated to allow for reconstruction of the session

      This implies either that my sessions are being considered invalid, a configuration issue, or possibly a bug. My HTTP session timeout is 20 minutes, so I should be fine in that regard.

      Relevant configuration:
      From jboss-web.xml

      From the http session cache section of jboss-cache-manager-jboss-beans:
      <property name="cacheLoaderConfig">
       <bean class="org.jboss.cache.config.CacheLoaderConfig">
       <!-- Do not change these -->
       <property name="passivation">true</property>
       <property name="shared">false</property>
       <property name="individualCacheLoaderConfigs">
       <bean class="org.jboss.cache.loader.FileCacheLoaderConfig">
       <!-- Where passivated sessions are stored -->
       <property name="location">${jboss.server.data.dir}${/}session2</property>
       <!-- Do not change these -->
       <property name="async">false</property>
       <property name="fetchPersistentState">true</property>
       <property name="purgeOnStartup">true</property>
       <property name="ignoreModifications">false</property>
       <property name="checkCharacterPortability">false</property>

      Is there a trick to getting this going? This should be possible correct?