Hi All.

Tomcat7.0.15 can not replicate session if web application defines
<distributable/> in WEB-INF/web.xml.
Tomcat7.0.14 can replicate session if web application defines
<distributable/> in WEB-INF/web.xml.
The behavior of this default was changed by rev1130618.
The cause is conf/web.xml is not distributable.

To enable session replication by default,
I thought two plans.

PlanA:
Add WebXml#setDistributable(true) to ContextConfig#webConfig().

Index: java/org/apache/catalina/startup/ContextConfig.java
===================================================================
--- java/org/apache/catalina/startup/ContextConfig.java (revision 1132530)
+++ java/org/apache/catalina/startup/ContextConfig.java (working copy)
@@ -1195,6 +1195,7 @@
          */
         WebXml webXmlDefaultFragment = createWebXml();
         webXmlDefaultFragment.setOverridable(true);
+        webXmlDefaultFragment.setDistributable(true);

         // Parse global web.xml if present
         InputSource globalWebXml = getGlobalWebXmlSource();


PlanB:
Add <distributable/> to conf/web.xml

Index: conf/web.xml
===================================================================
--- conf/web.xml        (revision 1127122)
+++ conf/web.xml        (working copy)
@@ -4176,4 +4176,6 @@
         <welcome-file>index.jsp</welcome-file>
     </welcome-file-list>

+  <!-- ====================  distributable ===================== -->
+    <distributable/>
 </web-app>


I intend to commit planA.
Any objections or other ideas?

-- 
Keiichi.Fujino

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to