From: markt Date: Thu, 29 Jul 2010 09:45:32 +0000 (+0000) Subject: Remove deprecated defaultMode attribute X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=13ff80f3c4e1fc5694879eb1186908271a7253b4;p=tomcat7.0 Remove deprecated defaultMode attribute Clarify current behaviour of maxActiveSessions Clean-up cluster-manager docs git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@980378 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/catalina/ha/ClusterManager.java b/java/org/apache/catalina/ha/ClusterManager.java index 675a0047a..a98495533 100644 --- a/java/org/apache/catalina/ha/ClusterManager.java +++ b/java/org/apache/catalina/ha/ClusterManager.java @@ -91,17 +91,6 @@ public interface ClusterManager extends Manager { */ 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; diff --git a/java/org/apache/catalina/ha/session/BackupManager.java b/java/org/apache/catalina/ha/session/BackupManager.java index f9ff387ca..4b5d78e8e 100644 --- a/java/org/apache/catalina/ha/session/BackupManager.java +++ b/java/org/apache/catalina/ha/session/BackupManager.java @@ -94,18 +94,6 @@ public class BackupManager extends StandardManager implements ClusterManager, Ma 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; diff --git a/java/org/apache/catalina/ha/session/DeltaManager.java b/java/org/apache/catalina/ha/session/DeltaManager.java index cc5e27832..1d43573a1 100644 --- a/java/org/apache/catalina/ha/session/DeltaManager.java +++ b/java/org/apache/catalina/ha/session/DeltaManager.java @@ -88,7 +88,6 @@ public class DeltaManager extends ClusterManagerBase{ */ 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 ClusterManagerBase{ } - /** - * @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; } diff --git a/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java b/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java index 74e512bea..25df1b30b 100644 --- a/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java +++ b/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java @@ -529,7 +529,6 @@ public class SimpleTcpCluster extends LifecycleBase String clusterName = getManagerName(cmanager.getName(), manager); cmanager.setName(clusterName); cmanager.setCluster(this); - cmanager.setDefaultMode(false); managers.put(clusterName, cmanager); // Notify our interested LifecycleListeners diff --git a/webapps/docs/config/cluster-manager.xml b/webapps/docs/config/cluster-manager.xml index 7c5119a31..6df58ed50 100644 --- a/webapps/docs/config/cluster-manager.xml +++ b/webapps/docs/config/cluster-manager.xml @@ -34,89 +34,102 @@
-

- A cluster manager is an extension to Tomcat's session manager interface, - org.apache.catalina.Manager - A cluster manager must implement the org.apache.catalina.ha.ClusterManager and is solely - responsible for how the session is replicated.
- There are currently two different managers, the org.apache.catalina.ha.session.DeltaManager 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 org.apache.catalina.ha.session.BackupManager 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.
- We are planning to add more managers with even more sophisticated backup mechanism to support even larger clusters. - Check back soon! -

+

A cluster manager is an extension to Tomcat's session manager interface, + org.apache.catalina.Manager. + A cluster manager must implement the + org.apache.catalina.ha.ClusterManager and is solely responsible + for how the session is replicated.
+ There are currently two different managers, the + org.apache.catalina.ha.session.DeltaManager 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 org.apache.catalina.ha.session.BackupManager 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.

-

- The <Manager> element defined inside the <Cluster> element - is the template defined for all web applications that are marked <distributable/> - in their web.xml file. - However, you can still override the manager implementation on a per web application basis, - by putting the <Manager> inside the <Context> element either in the - context.xml file or the server.xml file. -

+

The <Manager> element defined inside the + <Cluster> element is the template defined for all web + applications that are marked <distributable/> in their + web.xml file. However, you can still override the manager + implementation on a per web application basis, by putting the + <Manager> inside the <Context> element + either in the context.xml file or the + server.xml file.

- - - - 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 Cluster element to make it unique in the container. - - - Deprecated since 6.0.0 - - - Set to true if you wish to have session listeners notified when - session attributes are being replicated or removed across Tomcat nodes in the cluster. - - - 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 true. - Default value is false. - - + + + + 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 + Cluster element to make it unique in the container. + + + Set to true if you wish to have session listeners notified + when session attributes are being replicated or removed across Tomcat + nodes in the cluster. + + + 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 true. Default value is 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 - <Membership> - element. - - - 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 true. - Default value is 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 60 seconds. - + + 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 + <Membership> + element. + + + 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 true. + Default value is 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. + + + 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 60 seconds. + - - 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 6(synchronous).
- 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. -
+ + 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 6(synchronous).
+ 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. +
+ + 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. +