Announcement Announcement Module
Collapse
No announcement yet.
Tomcat Session Replication not working with Spring 3.2 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Tomcat Session Replication not working with Spring 3.2

    Hi
    I've tried to migrate a webapp from Spring 3.1.3 to 3.2.0. The application is using <mvc:annotation-driven>. After upgrading the Spring dependencies, Tomcat session replication has stopped to work.

    In the web.xml there is:
    Code:
    <distributable/>
    In the server.xml there is:
    Code:
    <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
    During Tomcat startup I can see in the logs that everything concerning the SimpleTcpCluster seems to work. The application is just not recognizing the cluster-setup.

    Analyzing with JConsole gives the following MBean values:
    Code:
    3.1.3:
     - Catalina.Manager.${ServletContext}.localhost.Attributes.className: org.apache.catalina.session.DeltaManager
     - Catalina.Manager.${ServletContext}.localhost.Attributes.distributable: true
    3.2.0:
     - Catalina.Manager.${ServletContext}.localhost.Attributes.className: org.apache.catalina.session.StandardManager
     - Catalina.Manager.${ServletContext}.localhost.Attributes.distributable: false
    Any ideas what is going wrong and how I can fix it?

    Thanks in advance for your replies.

  • #2
    Hi,
    today i have the same problem as you. The reason is, that with https://github.com/SpringSource/spri...ddebcaee5b9e29 the web-fragment.xml are added.

    On statup the tomcat read your web.xml and set distributable = true. Than the tomcat scan your jar's for web-fragment.xml's and merge these. If one fragment is not distributable the whole application is not distributable. The web-fragment.xml under https://github.com/SpringSource/spri...urces/META-INF is not marked as distributable, so is your application is not distributeable.

    My workaround are to remove the web-fragment.xml in the spring-web-3.2.0.RELEASE.jar, also you can add <distributable/> to the web-fragment.xml.

    Comment


    • #3
      Thanks. I hope I can give it a try today.

      Comment


      • #4
        The reason is, that with https://github.com/SpringSource/spri...ddebcaee5b9e29 the web-fragment.xml are added.
        Good catch, could you register a JIRA issue so that this can be fixed. This must have been an unfortunate side effect of adding the fragment.

        Comment


        • #5
          I already created an Issue https://jira.springsource.org/browse/SPR-10219 and create a pull request to fix it

          Comment


          • #6
            Originally posted by Dyas View Post
            I already created an Issue https://jira.springsource.org/browse/SPR-10219 and create a pull request to fix it
            I'm having the same issue. I created a new version of the web-fragment.xml since 3.2.2 is not out yet, but my sessions still aren't being replicated using a JDBCStore I set up. Is there anything else I need to do? I'm not seeing any other fragments in any jars in my web application.

            Comment

            Working...
            X