Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-2119

Tomcat session manager 'PersistentManager' not properly propagated

    XMLWordPrintable

Details

    Description

      JBoss 'TomcatDeployer' uses the catalina 'StandardManager' as the session
      manager for a not distributed web application, even if an other session
      manager (eg. PersistentManager) has been defined.

      The 'TomcatDeployer.performDeployInternal()' correctly creates the in the
      context.xml defined session Manager at the beginning of the method. At the
      end of the method it gets overwritten by the 'StandardManager'.
      Therefore any in the context.xml defined Manager has no effect.

      Is there a reason why the session manager gets overwritten by the
      'StandardManager' and if, how could we use the persistent file store?

      configuration:

      file: xxx.war/WEB-INF/context.xml:
      <Context path="/xxx" docBase="./deploy/clusteredservlet.war">
      <Manager className="org.apache.catalina.session.PersistentManager">
      <Store className="org.apache.catalina.session.FileStore" debug="5"
      checkInterval="5" directory="./mySessions"/>
      </Manager>
      </Context>

      file: xxx.war/WEB-INF/web.xml:
      <web-app id="WebApp_ID" version="2.4">
      <!-distributable/->
      ....

      quickfix:

      original:
      class org.jboss.web.tomcat.tc5.TomcatDeployer (Line 320-330)
      method performDeployInternal(...)
      ...
      if(metaData.getDistributable())

      {...}
      else
      {
      StandardManager manager = new StandardManager();
      manager.setPathname("");
      server.setAttribute(objectName, new Attribute("manager", manager));
      }


      new:
      class org.jboss.web.tomcat.tc5.TomcatDeployer (Line 320-330)
      method performDeployInternal(...)
      ...
      if(metaData.getDistributable()) {...}

      else {
      if(server.getAttribute(objectName, "manager") == null) {
      StandardManager manager = new StandardManager();
      manager.setPathname("");
      server.setAttribute(objectName, new Attribute("manager",
      manager));
      }
      }

      (on behalf of thorsten mielke)

      Attachments

        Activity

          People

            starksm64 Scott Stark (Inactive)
            cdrieschner1 Christoph Drieschner (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: