3 Replies Latest reply on Feb 5, 2013 9:42 AM by Paul Ferraro

    How to change Session Manager?

    drh01 Newbie

      I am running JBoss AS 7.1.1 and would like to be able to change the Session Manager in jbossweb.  In Tomcat, this is fairly straightforward, you define a <Manager> element underneath your <Context> element in your context.xml (or server.xml).


      But this doesn't appear to be an option with JBoss 7.  I've seen other users on this forum asking similar questions (like where is context.xml), with no responses.  There is some documentation that indicates you can still configure these things (http://docs.jboss.org/jbossweb/7.0.x/config/context.html) but I think this may be out of date for 7.1.


      This seems like it should be simple -- jbossweb is built on Tomcat, shouldn't I be able to change these configuration parameters?


      Specifically, I'd like to use the memcached session manager.



        • 1. Re: How to change Session Manager?
          Nicklas Karlsson Master

          7.1.1 uses JBossWeb 7.0.13 so perhaps it's not that out of date. Don't know about your issue but I recall valves (another Tomcat construct) being defined in jboss-web.xml so perhaps that is a place to start looking...

          • 2. Re: How to change Session Manager?
            Stephen Coy Master

            Have you had a look at https://docs.jboss.org/author/display/AS71/AS7+Cluster+Howto?


            While this does not specifically allow you to configure session replication using the memcached session manager (AFAIK), you may find a caching strategy using Infinispan with similar characteristics and behaviour.

            • 3. Re: How to change Session Manager?
              Paul Ferraro Master

              At the present moment, you can't swap out the entire org.apache.catalina.Manager implemention via configuration alone.  You can, however, swap the distributed storage mechanism (you'll need to adapt the memcached session manager to another SPI first) used by AS7's distributed session manager implementation.


              To do this, you would:

              1. create an implementation of the org.jboss.as.clustering.web.DistributedCacheManagerFactory interface (and all dependent interfaces)

              2. create a module that defines a META-INF/services/org.jboss.as.clustering.web.DistributedCacheManagerFactory file that points to your implementation

              3. replace the default implementation (org.jboss.as.clustering.web.infinispan) in $JBOSS_HOME/modules/org/jboss/as/clustering/web/spi/main/module.xml with your custom module.