1 Reply Latest reply on Jan 5, 2005 7:56 AM by Brian

    Sharing httpsession object - this should be a FAQ

    Brian Newbie

      Hi all,

      This post has come up several times but I can't find an answer.

      1) I have one ear that contains multiple wars.

      2) I want to share the http session object across each war.

      Is this possible.

      PS - single node, not using JAAS. Using JBoss Tomcat 4 rc2.

      I really think this should be in the faq by the way. It has come up loads:




        • 1. Re: Sharing httpsession object - this should be a FAQ
          Brian Newbie

          Found the answer from tomcat's faq:

          "7. How do I share sessions across webapps?

          You cannot share sessions directly across webapps, as that would be a violation of the Servlet Specification. There are workarounds, including using a singleton class loaded from the common classloader repository to hold shared information, or putting some of this shared information in a database or another data store. Some of these approaches have been discussed on the tomcat-user mailing list, whose archives you should search for more information.

          Sharing sessions across contains for clustering or replication is a different matter altogether."

          If my wars are all in a single ear, is there perhaps a solution using JBoss' single classloader for the one ear?

          Any ideas/experience with this?

          There must be some experiences :-)