Hi.

SimpleTcpCluster#sendClusterDomain called when domainReplication is
true is as follows now.

===SimpleTcpCluster#sendClusterDomain===
public void sendClusterDomain(ClusterMessage msg) {
    send(msg,null);
}
=== ===
the msg is transmitted to all cluster members.
domainReplication does not work correctly.

Tomcat7 and Tomcat6 have
org.apache.catalina.tribes.group.interceptors.DomainFilterInterceptor.
If DomainFilterInterceptor is used, session can be sent only to the
same domain.
Is DomainFilterInterceptor used instead of domainReplication?

-- 
Keiichi.Fujino

45:32 2010
> New Revision: 980378
>
> URL: http://svn.apache.org/viewvc?rev=980378&view=rev
> Log:
> Remove deprecated defaultMode attribute
> Clarify current behaviour of maxActiveSessions
> Clean-up cluster-manager docs
>
> Modified:
>    tomcat/trunk/java/org/apache/catalina/ha/ClusterManager.java
>    tomcat/trunk/java/org/apache/catalina/ha/session/BackupManager.java
>    tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.java
>    tomcat/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java
>    tomcat/trunk/webapps/docs/config/cluster-manager.xml
>
> Modified: tomcat/trunk/java/org/apache/catalina/ha/ClusterManager.java
> URL: 
> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/ClusterManager.java?rev=980378&r1=980377&r2=980378&view=diff
> ==============================================================================
> --- tomcat/trunk/java/org/apache/catalina/ha/ClusterManager.java (original)
> +++ tomcat/trunk/java/org/apache/catalina/ha/ClusterManager.java Thu Jul 29 
> 09:45:32 2010
> @@ -91,17 +91,6 @@ public interface ClusterManager extends
>     */
>    public void setDomainReplication(boolean domainReplication);
>
> -   /**
> -    * @param mode The mode
> -    * @since 5.5.10
> -    */
> -   public void setDefaultMode(boolean mode);
> -
> -   /**
> -    * @since 5.5.10
> -    */
> -   public boolean isDefaultMode();
> -
>    public ReplicationStream getReplicationStream(byte[] data) throws 
> IOException;
>
>    public ReplicationStream getReplicationStream(byte[] data, int offset, int 
> length) throws IOException;
>
> Modified: tomcat/trunk/java/org/apache/catalina/ha/session/BackupManager.java
> URL: 
> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/session/BackupManager.java?rev=980378&r1=980377&r2=980378&view=diff
> ==============================================================================
> --- tomcat/trunk/java/org/apache/catalina/ha/session/BackupManager.java 
> (original)
> +++ tomcat/trunk/java/org/apache/catalina/ha/session/BackupManager.java Thu 
> Jul 29 09:45:32 2010
> @@ -94,18 +94,6 @@ public class BackupManager extends Stand
>     public void setDomainReplication(boolean sendClusterDomainOnly) {
>     }
>
> -    /**
> -     * @return Returns the defaultMode.
> -     */
> -    public boolean isDefaultMode() {
> -        return false;
> -    }
> -    /**
> -     * @param defaultMode The defaultMode to set.
> -     */
> -    public void setDefaultMode(boolean defaultMode) {
> -    }
> -
>     public void setExpireSessionsOnShutdown(boolean expireSessionsOnShutdown)
>     {
>         mExpireSessionsOnShutdown = expireSessionsOnShutdown;
>
> Modified: tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.java
> URL: 
> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.java?rev=980378&r1=980377&r2=980378&view=diff
> ==============================================================================
> --- tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.java 
> (original)
> +++ tomcat/trunk/java/org/apache/catalina/ha/session/DeltaManager.java Thu 
> Jul 29 09:45:32 2010
> @@ -88,7 +88,6 @@ public class DeltaManager extends Cluste
>      */
>     protected static String managerName = "DeltaManager";
>     protected String name = null;
> -    protected boolean defaultMode = false;
>     private CatalinaCluster cluster = null;
>
>     /**
> @@ -474,20 +473,7 @@ public class DeltaManager extends Cluste
>     }
>
>
> -    /**
> -     * @return Returns the defaultMode.
> -     */
> -    public boolean isDefaultMode() {
> -        return defaultMode;
> -    }
> -    /**
> -     * @param defaultMode The defaultMode to set.
> -     */
> -    public void setDefaultMode(boolean defaultMode) {
> -        this.defaultMode = defaultMode;
> -    }
> -
> -    public CatalinaCluster getCluster() {
> +   public CatalinaCluster getCluster() {
>         return cluster;
>     }
>
>
> Modified: tomcat/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java
> URL: 
> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java?rev=980378&r1=980377&r2=980378&view=diff
> ==============================================================================
> --- tomcat/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java 
> (original)
> +++ tomcat/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java Thu 
> Jul 29 09:45:32 2010
> @@ -529,7 +529,6 @@ public class SimpleTcpCluster extends Li
>         String clusterName = getManagerName(cmanager.getName(), manager);
>         cmanager.setName(clusterName);
>         cmanager.setCluster(this);
> -        cmanager.setDefaultMode(false);
>
>         managers.put(clusterName, cmanager);
>         // Notify our interested LifecycleListeners
>
> Modified: tomcat/trunk/webapps/docs/config/cluster-manager.xml
> URL: 
> http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/cluster-manager.xml?rev=980378&r1=980377&r2=980378&view=diff
> ==============================================================================
> --- tomcat/trunk/webapps/docs/config/cluster-manager.xml (original)
> +++ tomcat/trunk/webapps/docs/config/cluster-manager.xml Thu Jul 29 09:45:32 
> 2010
> @@ -34,89 +34,102 @@
>  </section>
>
>  <section name="Introduction">
> -  <p>
> -  A cluster manager is an extension to Tomcat's session manager interface,
> -  <code>org.apache.catalina.Manager</code>
> -  A cluster manager must implement the 
> <code>org.apache.catalina.ha.ClusterManager</code> and is solely
> -  responsible for how the session is replicated.<br/>
> -  There are currently two different managers, the 
> <code>org.apache.catalina.ha.session.DeltaManager</code> replicates deltas
> -  of session data to all members in the cluster. This implementation is 
> proven and works very well, but has a limitation
> -  as it requires the cluster members to be homogeneous, all nodes must 
> deploy the same applications and be exact replicas.
> -  The <code>org.apache.catalina.ha.session.BackupManager</code> also 
> replicates deltas but only to one backup node.
> -  The location of the backup node is known to all nodes in the cluster. It 
> also supports heterogeneous deployments,
> -  so the manager knows at what locations the webapp is deployed.<br/>
> -  We are planning to add more managers with even more sophisticated backup 
> mechanism to support even larger clusters.
> -  Check back soon!
> -  </p>
> +  <p>A cluster manager is an extension to Tomcat's session manager interface,
> +  <code>org.apache.catalina.Manager</code>.
> +  A cluster manager must implement the
> +  <code>org.apache.catalina.ha.ClusterManager</code> and is solely  
> responsible
> +  for how the session is replicated.<br/>
> +  There are currently two different managers, the
> +  <code>org.apache.catalina.ha.session.DeltaManager</code> replicates deltas 
> of
> +  session data to all members in the cluster. This implementation is proven 
> and
> +  works very well, but has a limitation as it requires the cluster members 
> to be
> +  homogeneous, all nodes must deploy the same applications and be exact
> +  replicas. The <code>org.apache.catalina.ha.session.BackupManager</code> 
> also
> +  replicates deltas but only to one backup node. The location of the backup 
> node
> +  is known to all nodes in the cluster. It also supports heterogeneous
> +  deployments, so the manager knows at what locations the web application is
> +  deployed.</p>
>  </section>
>
>  <section name="The &lt;Manager&gt;">
> -  <p>
> -   The <code>&lt;Manager&gt;</code> element defined inside the 
> <code>&lt;Cluster&gt;</code> element
> -   is the template defined for all web applications that are marked 
> <code>&lt;distributable/&gt;</code>
> -   in their <code>web.xml</code> file.
> -   However, you can still override the manager implementation on a per web 
> application basis,
> -   by putting the <code>&lt;Manager&gt;</code> inside the 
> <code>&lt;Context&gt;</code> element either in the
> -   <code><a href="context.html">context.xml</a></code> file or the <code><a 
> href="index.html">server.xml</a></code> file.
> -  </p>
> +  <p>The <code>&lt;Manager&gt;</code> element defined inside the
> +  <code>&lt;Cluster&gt;</code> element is the template defined for all web
> +  applications that are marked <code>&lt;distributable/&gt;</code> in their
> +  <code>web.xml</code> file. However, you can still override the manager
> +  implementation on a per web application basis, by putting the
> +  <code>&lt;Manager&gt;</code> inside the <code>&lt;Context&gt;</code> 
> element
> +  either in the <code><a href="context.html">context.xml</a></code> file or 
> the
> +  <code><a href="index.html">server.xml</a></code> file.</p>
>  </section>
>
>  <section name="Attributes">
>   <subsection name="Common Attributes">
>     <attributes>
> -     <attribute name="className" required="true">
> -     </attribute>
> -     <attribute name="name" required="false">
> -      <b>The name of this cluster manager, the name is used to identify a 
> session manager on a node.
> -      The name might get modified by the <code>Cluster</code> element to 
> make it unique in the container.</b>
> -     </attribute>
> -     <attribute name="defaultMode" required="false">
> -      <b>Deprecated since 6.0.0</b>
> -     </attribute>
> -     <attribute name="notifyListenersOnReplication" required="false">
> -       Set to <code>true</code> if you wish to have session listeners 
> notified when
> -       session attributes are being replicated or removed across Tomcat 
> nodes in the cluster.
> -     </attribute>
> -     <attribute name="expireSessionsOnShutdown" required="false">
> -       When a webapplication is being shutdown, Tomcat issues an expire call 
> to each session to
> -       notify all the listeners. If you wish for all sessions to expire on 
> all nodes when
> -       a shutdown occurs on one node, set this value to <code>true</code>.
> -       Default value is <code>false</code>.
> -     </attribute>
> -
> +      <attribute name="className" required="true">
> +      </attribute>
> +      <attribute name="name" required="false">
> +        <b>The name of this cluster manager, the name is used to identify a
> +        session manager on a node. The name might get modified by the
> +        <code>Cluster</code> element to make it unique in the container.</b>
> +      </attribute>
> +      <attribute name="notifyListenersOnReplication" required="false">
> +        Set to <code>true</code> if you wish to have session listeners 
> notified
> +        when session attributes are being replicated or removed across Tomcat
> +        nodes in the cluster.
> +      </attribute>
> +      <attribute name="expireSessionsOnShutdown" required="false">
> +        When a web application is being shutdown, Tomcat issues an expire 
> call
> +        to each session to notify all the listeners. If you wish for all
> +        sessions to expire on all nodes when a shutdown occurs on one node, 
> set
> +        this value to <code>true</code>. Default value is <code>false</code>.
> +      </attribute>
>     </attributes>
>   </subsection>
>   <subsection name="org.apache.catalina.ha.session.DeltaManager Attributes">
>     <attributes>
> -     <attribute name="domainReplication" required="false">
> -      Set to true if you wish sessions to be replicated only to members that 
> have the same logical
> -      domain set. If set to false, session replication will ignore the 
> domain setting the
> -      <code><a href="cluster-membership.html">&lt;Membership&gt;</a></code>
> -      element.
> -     </attribute>
> -     <attribute name="expireSessionsOnShutdown" required="false">
> -       When a webapplication is being shutdown, Tomcat issues an expire call 
> to each session to
> -       notify all the listeners. If you wish for all sessions to expire on 
> all nodes when
> -       a shutdown occurs on one node, set this value to <code>true</code>.
> -       Default value is <code>false</code>.
> -     </attribute>
> -     <attribute name="stateTransferTimeout" required="false">
> -       The time in seconds to wait for a session state transfer to complete 
> from another node
> -       when a node is starting up.
> -       Default value is <code>60</code> seconds.
> -     </attribute>
> +      <attribute name="domainReplication" required="false">
> +        Set to true if you wish sessions to be replicated only to members 
> that
> +        have the same logical domain set. If set to false, session 
> replication
> +        will ignore the domain setting the
> +        <code><a href="cluster-membership.html">&lt;Membership&gt;</a></code>
> +        element.
> +      </attribute>
> +      <attribute name="expireSessionsOnShutdown" required="false">
> +        When a web application is being shutdown, Tomcat issues an expire 
> call
> +        to each session to notify all the listeners. If you wish for all
> +        sessions to expire on all nodes when a shutdown occurs on one node, 
> set
> +        this value to <code>true</code>.
> +        Default value is <code>false</code>.
> +      </attribute>
> +      <attribute name="maxActiveSessions" required="false">
> +        The maximum number of active sessions that will be created by this
> +        Manager, or -1 (the default) for no limit. For this manager, all
> +        sessions are counted as active sessions irrespective if whether or 
> not
> +        the current node is the primary node for the session.
> +      </attribute>
> +      <attribute name="stateTransferTimeout" required="false">
> +        The time in seconds to wait for a session state transfer to complete
> +        from another node when a node is starting up.
> +        Default value is <code>60</code> seconds.
> +      </attribute>
>     </attributes>
>   </subsection>
>   <subsection name="org.apache.catalina.ha.session.BackupManager Attributes">
>     <attributes>
> -     <attribute name="mapSendOptions" required="false">
> -       The backup manager uses a replicated map, this map is sending and
> -       receiving messages. You can setup the flag for how this map is sending
> -       messages, the default value is <code>6</code>(synchronous).<br/>
> -       Note that if you use asynchronous messaging it is possible for update
> -       messages for a session to be processed by the receiving node in a
> -       different order to the order in which they were sent.
> -     </attribute>
> +      <attribute name="mapSendOptions" required="false">
> +        The backup manager uses a replicated map, this map is sending and
> +        receiving messages. You can setup the flag for how this map is 
> sending
> +        messages, the default value is <code>6</code>(synchronous).<br/>
> +        Note that if you use asynchronous messaging it is possible for update
> +        messages for a session to be processed by the receiving node in a
> +        different order to the order in which they were sent.
> +      </attribute>
> +      <attribute name="maxActiveSessions" required="false">
> +        The maximum number of active sessions that will be created by this
> +        Manager, or -1 (the default) for no limit. For this manager, only
> +        sessions where the current node is the primary node for the session 
> are
> +        considered active sessions.
> +      </attribute>
>     </attributes>
>   </subsection>
>  </section>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
>



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