Author: markt
Date: Tue Jan 19 23:51:23 2016
New Revision: 1725654
URL: http://svn.apache.org/viewvc?rev=1725654&view=rev
Log:
Remove deprecated attributes from Manager
Modified:
tomcat/trunk/java/org/apache/catalina/Manager.java
tomcat/trunk/java/org/apache/catalina/ha/session/mbeans-descriptors.xml
tomcat/trunk/java/org/apache/catalina/session/ManagerBase.java
tomcat/trunk/java/org/apache/catalina/session/mbeans-descriptors.xml
tomcat/trunk/webapps/docs/changelog.xml
tomcat/trunk/webapps/docs/config/cluster-manager.xml
tomcat/trunk/webapps/docs/config/manager.xml
Modified: tomcat/trunk/java/org/apache/catalina/Manager.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Manager.java?rev=1725654&r1=1725653&r2=1725654&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/Manager.java (original)
+++ tomcat/trunk/java/org/apache/catalina/Manager.java Tue Jan 19 23:51:23 2016
@@ -62,59 +62,6 @@ public interface Manager {
/**
- * Is this Manager marked as using distributable sessions?
- *
- * @return {@code true} if this manager is marked as distributable
otherwise
- * {@code false}
- *
- * @deprecated Ignored. {@link Context#getDistributable()} always takes
- * precedence. Will be removed in Tomcat 9.0.x.
- */
- @Deprecated
- public boolean getDistributable();
-
-
- /**
- * Configure whether this manager uses distributable sessions. If this flag
- * is set, all user data objects added to sessions associated with this
- * manager must implement Serializable.
- *
- * @param distributable The new distributable flag
- *
- * @deprecated Ignored. {@link Context#getDistributable()} always takes
- * precedence. Will be removed in Tomcat 9.0.x.
- */
- @Deprecated
- public void setDistributable(boolean distributable);
-
-
- /**
- * Get the default time in seconds before a session managed by this manager
- * will be considered inactive.
- *
- * @return The default maximum inactive interval in seconds
- *
- * @deprecated Ignored. {@link Context#getSessionTimeout()} always takes
- * precedence. Will be removed in Tomcat 9.0.x.
- */
- @Deprecated
- public int getMaxInactiveInterval();
-
-
- /**
- * Set the default maximum inactive interval (in seconds)
- * for Sessions created by this Manager.
- *
- * @param interval The new default value
- *
- * @deprecated Ignored. {@link Context#getSessionTimeout()} always takes
- * precedence. Will be removed in Tomcat 9.0.x.
- */
- @Deprecated
- public void setMaxInactiveInterval(int interval);
-
-
- /**
* @return the session id generator
*/
public SessionIdGenerator getSessionIdGenerator();
Modified:
tomcat/trunk/java/org/apache/catalina/ha/session/mbeans-descriptors.xml
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/session/mbeans-descriptors.xml?rev=1725654&r1=1725653&r2=1725654&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/ha/session/mbeans-descriptors.xml
(original)
+++ tomcat/trunk/java/org/apache/catalina/ha/session/mbeans-descriptors.xml Tue
Jan 19 23:51:23 2016
@@ -170,10 +170,6 @@
type="long"
writeable="false"/>
<attribute
- name="distributable"
- description="The distributable flag for Sessions created by this Manager"
- type="boolean"/>
- <attribute
name="duplicates"
description="Number of duplicated session ids generated"
type="int"/>
@@ -200,10 +196,6 @@
description="The maximum number of active Sessions allowed, or -1 for no
limit"
type="int"/>
<attribute
- name="maxInactiveInterval"
- description="The default maximum inactive interval for Sessions created
by this Manager"
- type="int"/>
- <attribute
name="name"
description="The descriptive name of this Manager implementation (for
logging)"
type="java.lang.String"
@@ -440,10 +432,6 @@
type="java.lang.String"
writeable="false"/>
<attribute
- name="distributable"
- description="The distributable flag for Sessions created by this Manager"
- type="boolean"/>
- <attribute
name="duplicates"
description="Number of duplicated session ids generated"
type="int"/>
@@ -474,10 +462,6 @@
description="The maximum number of active Sessions allowed, or -1 for no
limit"
type="int"/>
<attribute
- name="maxInactiveInterval"
- description="The default maximum inactive interval for Sessions created
by this Manager"
- type="int"/>
- <attribute
name="name"
description="The name of component. "
type="java.lang.String"/>
Modified: tomcat/trunk/java/org/apache/catalina/session/ManagerBase.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/ManagerBase.java?rev=1725654&r1=1725653&r2=1725654&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/session/ManagerBase.java (original)
+++ tomcat/trunk/java/org/apache/catalina/session/ManagerBase.java Tue Jan 19
23:51:23 2016
@@ -71,34 +71,12 @@ public abstract class ManagerBase extend
/**
- * The distributable flag for Sessions created by this Manager. If this
- * flag is set to <code>true</code>, any user attributes added to a
- * session controlled by this Manager must be Serializable.
- *
- * @deprecated Ignored. {@link Context#getDistributable()} always takes
- * precedence. Will be removed in Tomcat 9.0.x.
- */
- @Deprecated
- protected boolean distributable;
-
-
- /**
* The descriptive name of this Manager implementation (for logging).
*/
private static final String name = "ManagerBase";
/**
- * The default maximum inactive interval for Sessions created by
- * this Manager.
- *
- * @deprecated Ignored. {@link Context#getSessionTimeout()} always takes
- * precedence. Will be removed in Tomcat 9.0.x.
- */
- @Deprecated
- protected int maxInactiveInterval = 30 * 60;
-
- /**
* The Java class name of the secure random number generator class to be
* used when generating session identifiers. The random number generator
* class must be self-seeding and have a zero-argument constructor. If not
@@ -377,42 +355,6 @@ public abstract class ManagerBase extend
}
- @Deprecated
- @Override
- public boolean getDistributable() {
- Context context = getContext();
- if (context == null) {
- return false;
- }
- return context.getDistributable();
- }
-
-
- @Deprecated
- @Override
- public void setDistributable(boolean distributable) {
- // NO-OP
- }
-
-
- @Deprecated
- @Override
- public int getMaxInactiveInterval() {
- Context context = getContext();
- if (context == null) {
- return -1;
- }
- return context.getSessionTimeout() * 60;
- }
-
-
- @Deprecated
- @Override
- public void setMaxInactiveInterval(int interval) {
- // NO-OP
- }
-
-
@Override
public SessionIdGenerator getSessionIdGenerator() {
if (sessionIdGenerator != null) {
@@ -699,7 +641,7 @@ public abstract class ManagerBase extend
session.setNew(true);
session.setValid(true);
session.setCreationTime(System.currentTimeMillis());
- session.setMaxInactiveInterval(this.maxInactiveInterval);
+ session.setMaxInactiveInterval(getContext().getSessionTimeout() * 60);
String id = sessionId;
if (id == null) {
id = generateSessionId();
Modified: tomcat/trunk/java/org/apache/catalina/session/mbeans-descriptors.xml
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/mbeans-descriptors.xml?rev=1725654&r1=1725653&r2=1725654&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/session/mbeans-descriptors.xml
(original)
+++ tomcat/trunk/java/org/apache/catalina/session/mbeans-descriptors.xml Tue
Jan 19 23:51:23 2016
@@ -33,11 +33,6 @@
type="java.lang.String"
writeable="false"/>
- <attribute name="distributable"
- description="The distributable flag for Sessions created by this
- Manager"
- type="boolean"/>
-
<attribute name="duplicates"
description="Number of duplicated session ids generated"
type="int" />
@@ -60,11 +55,6 @@
for no limit"
type="int"/>
- <attribute name="maxInactiveInterval"
- description="The default maximum inactive interval for Sessions
- created by this Manager"
- type="int"/>
-
<attribute name="name"
description="The descriptive name of this Manager implementation
(for logging)"
@@ -227,10 +217,6 @@
type="java.lang.String"
writeable="false"/>
- <attribute name="distributable"
- description="The distributable flag for Sessions created by this
Manager"
- type="boolean"/>
-
<attribute name="duplicates"
description="Number of duplicated session ids generated"
type="int" />
@@ -261,10 +247,6 @@
description="Indicates how many seconds old a session can get, after
its last use in a request, before it should be backed up to the store. -1 means
sessions are not backed up."
type="int"/>
- <attribute name="maxInactiveInterval"
- description="The default maximum inactive interval for Sessions
created by this Manager"
- type="int"/>
-
<attribute name="minIdleSwap"
description=" The minimum time in seconds that a session must be
idle before it can be swapped out of memory, or -1 if it can be swapped out at
any time."
type="int"/>
Modified: tomcat/trunk/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1725654&r1=1725653&r2=1725654&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Tue Jan 19 23:51:23 2016
@@ -214,6 +214,12 @@
options are avaialble for all of the Manager implementations that ship
with Tomcat. (markt)
</add>
+ <scode>
+ Remove <code>distributable</code> and <code>maxInactiveInterval</code>
+ from the <code>Manager</code> interface because the attributes are
never
+ used. The equivalent attributes from the <code>Context</code> always
+ take precedence. (markt)
+ </scode>
</changelog>
</subsection>
<subsection name="Coyote">
Modified: tomcat/trunk/webapps/docs/config/cluster-manager.xml
URL:
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/cluster-manager.xml?rev=1725654&r1=1725653&r2=1725654&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/config/cluster-manager.xml (original)
+++ tomcat/trunk/webapps/docs/config/cluster-manager.xml Tue Jan 19 23:51:23
2016
@@ -77,17 +77,6 @@
when session attributes are being replicated or removed across Tomcat
nodes in the cluster.
</attribute>
- <attribute name="maxInactiveInterval" required="false">
- <p>The initial maximum time interval, in seconds,
- between client requests before a session is invalidated. A negative
value
- will result in sessions never timing out. If the attribute is not
provided,
- a default of 1800 seconds (30 minutes) is used.</p>
-
- <p>This attribute provides the initial value whenever a
- new session is created, but the interval may be dynamically
- varied by a servlet via the
- <code>setMaxInactiveInterval</code> method of the
<code>HttpSession</code> object.</p>
- </attribute>
<attribute name="processExpiresFrequency" required="false">
<p>Frequency of the session expiration, and related manager operations.
Manager operations will be done once for the specified amount of
Modified: tomcat/trunk/webapps/docs/config/manager.xml
URL:
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/manager.xml?rev=1725654&r1=1725653&r2=1725654&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/config/manager.xml (original)
+++ tomcat/trunk/webapps/docs/config/manager.xml Tue Jan 19 23:51:23 2016
@@ -65,22 +65,6 @@
If not specified, the standard value (defined below) will be used.</p>
</attribute>
- <attribute name="distributable" required="false">
- <p><strong>Deprecated</strong>: This should be configured via the
- Context.</p>
- <p>Set to <code>true</code> to ask the session manager to enforce
- the restrictions described in the Servlet Specification on
- distributable applications (primarily, this would mean that all
- session attributes must implement <code>java.io.Serializable</code>).
- Set to <code>false</code> (the default) to not enforce these
- restrictions.</p>
-
- <p><strong>NOTE</strong> - The value for this property is inherited
- automatically based on the presence or absence of the
- <code><distributable></code> element in the web application
- deployment descriptor (<code>/WEB-INF/web.xml</code>).</p>
- </attribute>
-
<attribute name="maxActiveSessions" required="false">
<p>The maximum number of active sessions that will be created by
this Manager, or <code>-1</code> (the default) for no limit.</p>
@@ -89,20 +73,6 @@
(e.g. with <code>HttpServletRequest.getSession()</code> call)
will fail with an <code>IllegalStateException</code>.</p>
</attribute>
-
- <attribute name="maxInactiveInterval" required="false">
- <p><strong>Deprecated</strong>: This should be configured via the
- Context.</p>
- <p>The initial maximum time interval, in seconds,
- between client requests before a session is invalidated. A negative
value
- will result in sessions never timing out. If the attribute is not
provided,
- a default of 1800 seconds (30 minutes) is used.</p>
-
- <p>This attribute provides the initial value whenever a
- new session is created, but the interval may be dynamically
- varied by a servlet via the
- <code>setMaxInactiveInterval</code> method of the
<code>HttpSession</code> object.</p>
- </attribute>
</attributes>
</subsection>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]