[jboss-cvs] JBossAS SVN: r66988 - trunk/tomcat/src/resources.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Nov 12 16:45:39 EST 2007


Author: bstansberry at jboss.com
Date: 2007-11-12 16:45:38 -0500 (Mon, 12 Nov 2007)
New Revision: 66988

Modified:
   trunk/tomcat/src/resources/war-deployers-all-beans.xml
   trunk/tomcat/src/resources/war-deployers-beans.xml
Log:
[JBAS-4967] Extract setting of default clustering JBossWebMetaData from TomcatDeployer

Modified: trunk/tomcat/src/resources/war-deployers-all-beans.xml
===================================================================
--- trunk/tomcat/src/resources/war-deployers-all-beans.xml	2007-11-12 21:44:08 UTC (rev 66987)
+++ trunk/tomcat/src/resources/war-deployers-all-beans.xml	2007-11-12 21:45:38 UTC (rev 66988)
@@ -29,7 +29,69 @@
    <bean name="JBossWebAppParsingDeployer" class="org.jboss.deployment.JBossWebAppParsingDeployer">
       <property name="type">war</property>
       <property name="relativeOrder">2001</property>
-   </bean>
+   </bean>
+        
+   <!-- 
+        Injects default clustering metadata.
+        
+        FIXME. This is a temporary measure until we set up a jboss-web.xml 
+        equivalent to conf/web.xml and  conf/standardjboss.xml and use it as the 
+        source for all defaults. 
+   -->
+   <bean name="WebAppClusteringDefaultsDeployer" 
+         class="org.jboss.web.tomcat.service.deployers.ClusteringDefaultsDeployer"> 
+      
+      <property name="relativeOrder">2002</property>
+      
+      <!--<property name="cacheSource">jboss.cache:service=TomcatClusteringCache</property>-->
+      
+      <property name="cacheName">jboss.cache:service=TomcatClusteringCache</property>
+      
+      <!--
+      The following two properties define when sessions are replicated to 
+      the other nodes.
+      The default value, "instant", synchronously replicates changes
+      to the other nodes at the end of requests. In this case, the 
+      "SnapshotInterval" property is not used.
+      The "interval" mode, in association with the "SnapshotInterval"
+      property, indicates that modified sessions will only be replicated
+      every "SnapshotInterval" milliseconds at most.   
+      
+      Note that this property is not in effect if the replication-granularity
+      is set to FIELD. If it is FIELD, it will be per http request (that is, 
+      "instant" mode.)
+      -->
+      <property name="snapshotMode">INSTANT</property>
+      <property name="snapshotInterval">1000</property>
+      
+      <property name="replicationGranularity">SESSION</property>
+      <property name="replicationTrigger">SET_AND_NON_PRIMITIVE_GET</property>
+      <property name="replicationFieldBatchMode">true</property>
+      
+      <!--
+      Whether by default to add special session handling to coordinate use 
+      with mod_jk or other JK connector variants. 
+      If a JK connector is used, you will need to set the JvmRoute inside 
+      JBossWeb, e.g. configure,
+        Engine name="jboss.web" jvmRoute="Node1" defaultHost="localhost" 
+      in server.xml.
+      
+      This value can be configured per webapp in the webapp's jboss.xml.
+      
+      If not set, the default will be to add the special session handling
+      if a jvmRoute is configured on the Engine. So, generally the only reason
+      to configure this overall default is to set it to 'false' and thus force
+      per webapp configuration.
+      -->
+      <!-- 
+      <property name="useJK">false</property>
+      -->
+      
+      <property name="useSessionPassivation">false</property>
+      <property name="passivationMaxIdleTime">-1</property>  
+      <property name="passivationMinIdleTime">-1</property>
+      
+   </bean>   
    
    <bean name="WarDeployer" class="org.jboss.web.tomcat.service.deployers.TomcatDeployer">
       <!-- Inject the MainDeployer for resolving cross deployment refs -->
@@ -117,66 +179,10 @@
       <property name="sessionIdAlphabet">ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-_</property>
       -->
 
-      <!--
-      *******************************************************
-      ****************** CLUSTERING *************************
-      *******************************************************
-      In order to activate HTTP Session clustering for Tomcat
-      make sure you run JBoss's "all" configuration i.e.
-      "run -c all"
-      (the default configuration doesn't contain clustering)
-
-      Furthermore, you may change SnapshotMode and
-      SnapshotInterval propertys below to indicate when to
-      synchronize changes with the other node(s).
-
-      If you use Apache+mod_jk(2) you will most probably use
-      the AJP1.3 connector below. Thus, if you so wish,
-      you may comment (i.e. deactivate) the HTTP connector
-      as it won't be used anymore.
-
-      *******************************************************
-      *******************************************************
-      *******************************************************
-      -->
-      
-      <!--
-      If you are using clustering, the following two properties
-      define when the sessions are replicated to the other nodes.
-      The default value, "instant", synchronously replicates changes
-      to the other nodes at the end of requests. In this case, the 
-      "SnapshotInterval" property is not used.
-      The "interval" mode, in association with the "SnapshotInterval"
-      property, indicates that modified sessions will only be replicated
-      every "SnapshotInterval" milliseconds at most.   
-      
-      Note that this property is not in effect if the replication-granularity
-      is set to FIELD. If it is FIELD, it will be per http request (that is, 
-      "instant" mode.)
-      -->
-      <property name="snapshotMode">instant</property> <!-- you may switch to "interval" -->
-      <property name="snapshotInterval">2000</property>
-
-      <!--
-      Whether to use MOD_JK(2) for load balancing with sticky session 
-      combined with JvmRoute. If set to true, it will insert a JvmRouteValve 
-      to intercept every request and replace the JvmRoute if it detects a 
-      failover. In addition, you will need to set the JvmRoute inside
-      Tomcat, e.g.,
-        Engine name="jboss.web" jvmRoute="Node1" defaultHost="localhost" 
-      in server.xml.
-
-      For clustering purpose only.
-      -->
-      <property name="useJK">false</property>
-
       <property name="domain">jboss.web</property>
       <property name="securityManagerService">
          <inject bean="jboss.security:service=JaasSecurityManager" />
       </property>
-     <!-- TODO determine how to express this dependency 
-      <depends>jboss.cache:service=TomcatClusteringCache</depends>
-      -->
 
        <!-- Specify a SecurityManagement Wrapper -->
        <property name="securityManagement">

Modified: trunk/tomcat/src/resources/war-deployers-beans.xml
===================================================================
--- trunk/tomcat/src/resources/war-deployers-beans.xml	2007-11-12 21:44:08 UTC (rev 66987)
+++ trunk/tomcat/src/resources/war-deployers-beans.xml	2007-11-12 21:45:38 UTC (rev 66988)
@@ -37,7 +37,69 @@
          - ->
       <property name="filteredPackages">javax.servlet,org.apache.commons.logging</property>
    </bean>
-  -->
+  --> 
+        
+   <!-- 
+        Injects default clustering metadata.
+        
+        FIXME. This is a temporary measure until we set up a jboss-web.xml 
+        equivalent to conf/web.xml and  conf/standardjboss.xml and use it as the 
+        source for all defaults. 
+   -->
+   <bean name="WebAppClusteringDefaultsDeployer" 
+         class="org.jboss.web.tomcat.service.deployers.ClusteringDefaultsDeployer"> 
+      
+      <property name="relativeOrder">2002</property>
+      
+      <!--<property name="cacheSource">jboss.cache:service=TomcatClusteringCache</property>-->
+      
+      <property name="cacheName">jboss.cache:service=TomcatClusteringCache</property>
+      
+      <!--
+      The following two properties define when sessions are replicated to 
+      the other nodes.
+      The default value, "instant", synchronously replicates changes
+      to the other nodes at the end of requests. In this case, the 
+      "SnapshotInterval" property is not used.
+      The "interval" mode, in association with the "SnapshotInterval"
+      property, indicates that modified sessions will only be replicated
+      every "SnapshotInterval" milliseconds at most.   
+      
+      Note that this property is not in effect if the replication-granularity
+      is set to FIELD. If it is FIELD, it will be per http request (that is, 
+      "instant" mode.)
+      -->
+      <property name="snapshotMode">INSTANT</property>
+      <property name="snapshotInterval">1000</property>
+      
+      <property name="replicationGranularity">SESSION</property>
+      <property name="replicationTrigger">SET_AND_NON_PRIMITIVE_GET</property>
+      <property name="replicationFieldBatchMode">true</property>
+      
+      <!--
+      Whether by default to add special session handling to coordinate use 
+      with mod_jk or other JK connector variants. 
+      If a JK connector is used, you will need to set the JvmRoute inside 
+      JBossWeb, e.g. configure,
+        Engine name="jboss.web" jvmRoute="Node1" defaultHost="localhost" 
+      in server.xml.
+      
+      This value can be configured per webapp in the webapp's jboss.xml.
+      
+      If not set, the default will be to add the special session handling
+      if a jvmRoute is configured on the Engine. So, generally the only reason
+      to configure this overall default is to set it to 'false' and thus force
+      per webapp configuration.
+      -->
+      <!-- 
+      <property name="useJK">false</property>
+      -->
+      
+      <property name="useSessionPassivation">false</property>
+      <property name="passivationMaxIdleTime">-1</property>  
+      <property name="passivationMinIdleTime">-1</property>
+      
+   </bean>   
 
    <!-- The WebMetaData to service mbean deployer -->
    <bean name="WarDeployer" class="org.jboss.web.tomcat.service.deployers.TomcatDeployer">
@@ -128,60 +190,7 @@
            It must be made up of exactly 65 unique characters
       <property name="sessionIdAlphabet">ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-_</property>
       -->
-
-      <!--
-      *******************************************************
-      ****************** CLUSTERING *************************
-      *******************************************************
-      In order to activate HTTP Session clustering for Tomcat
-      make sure you run JBoss's "all" configuration i.e.
-      "run -c all"
-      (the default configuration doesn't contain clustering)
-
-      Furthermore, you may change SnapshotMode and
-      SnapshotInterval propertys below to indicate when to
-      synchronize changes with the other node(s).
-
-      If you use Apache+mod_jk(2) you will most probably use
-      the AJP1.3 connector below. Thus, if you so wish,
-      you may comment (i.e. deactivate) the HTTP connector
-      as it won't be used anymore.
-
-      *******************************************************
-      *******************************************************
-      *******************************************************
-      -->
       
-      <!--
-      If you are using clustering, the following two propertys
-      define when the sessions are replicated to the other nodes.
-      The default value, "instant", synchronously replicates changes
-      to the other nodes at the end of requests. In this case, the 
-      "SnapshotInterval" property is not used.
-      The "interval" mode, in association with the "SnapshotInterval"
-      property, indicates that modified sessions will only be replicated
-      every "SnapshotInterval" milliseconds at most.   
-      
-      Note that this property is not in effect if the replication-granularity
-      is set to FIELD. If it is FIELD, it will be per http request (that is, 
-      "instant" mode.)
-      -->
-      <property name="snapshotMode">instant</property> <!-- you may switch to "interval" -->
-      <property name="snapshotInterval">2000</property>
-
-      <!--
-      Whether to use MOD_JK(2) for load balancing with sticky session 
-      combined with JvmRoute. If set to true, it will insert a JvmRouteValve 
-      to intercept every request and replace the JvmRoute if it detects a 
-      failover. In addition, you will need to set the JvmRoute inside
-      Tomcat, e.g.,
-        Engine name="jboss.web" jvmRoute="Node1" defaultHost="localhost" 
-      in server.xml.
-
-      For clustering purpose only.
-      -->
-      <property name="useJK">false</property>
-
       <property name="domain">jboss.web</property>
       <property name="securityManagerService">
          <inject bean="jboss.security:service=JaasSecurityManager" />




More information about the jboss-cvs-commits mailing list