1 Reply Latest reply on Sep 12, 2013 7:53 PM by desau

    File-based persistent sessions in JBoss 4.2.2

    Newbie

      Hi all,

       

      I'm trying to figure out how to enable file-based persistent sessions in JBoss 4.2.2.  I've managed to figure out how to do this in tomcat 6, but the solution eludes me for JBoss 4.2.2.

       

      It seems the solution is different for each version of JBoss.

       

      I just want the sessions to be serialized to a file so that they will survive an app server restart.  I don't care about clustering, and I don't want to write to a database.

       

      Thanks!

      -d

        • 1. Re: File-based persistent sessions in JBoss 4.2.2
          Newbie

          Figured this out.  Again, this is for JBoss 4.2.2, not sure if it applies to any other JBoss versions.

           

          In my web.xml, I added: <distributable>true</distributable>

           

          In my jboss-web.deployer/context.xml, I added:

          <Manager pathname="SESSIONS.ser" />

           

          (Removing the existing Manager node with an empty pathname attribute)

           

          Now when JBoss restarts, I see the SESSIONS.ser, and sessions persist across the restart.

           

          Obviously this means that everything that goes into the session needs to be serializable.