Results 1 to 6 of 6

Thread: Tomcat Session Replication not working with Spring 3.2

  1. #1
    Join Date
    Jan 2013
    Posts
    2

    Default 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. #2
    Join Date
    Jan 2013
    Posts
    2

    Default

    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.

  3. #3
    Join Date
    Jan 2013
    Posts
    2

    Default

    Thanks. I hope I can give it a try today.

  4. #4
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,695

    Default

    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.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  5. #5
    Join Date
    Jan 2013
    Posts
    2

    Default

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

  6. #6
    Join Date
    Aug 2012
    Posts
    1

    Default

    Quote 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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •