1 Reply Latest reply on Jul 8, 2003 7:42 PM by Jon Barnett

    Persist HttpSession

    bangclash Newbie

      On Websphere there is a feature to persist HttpSession onto a DB2 database. Does a similar feature exist on JBoss?

        • 1. Re: Persist HttpSession
          Jon Barnett Master

          No. This is a WebSphere feature as they note in the WebSphere classes. It is both a selling point and also a lock-in point.

          If you want to persist sessions across a cluster, this is already supported for JBoss/HA clustering.

          If you want to store the session data to DB for later retrieval when the session dies, you would need to implement it the J2EE way using HttpSessionBindingListener,HttpSessionBindingEvent.

          This would export the data when your session dies and you would need to provide routines to reimport the data when you re-establish a user session. This would work well for authenticated sessions where a user would log back in, but may be problematic in other situations.

          Tomcat provided an experimental persistence manager, but this has not yet been integrated into the JBoss framework AFAIK. Due to the specialised plumbing work in the servlet container, this does not make it transportable for plug-in support across all possible servlet containers that integrate with JBoss.

          You might see implementation with the existing distributable session store in the future, or you might consider making the modifications yourself as you have the source code.

          I think that covers the options available to you, depending on your requirements.