diff --git a/java/org/apache/catalina/ha/session/ClusterManagerBase.java b/java/org/apache/catalina/ha/session/ClusterManagerBase.java index b1a9975920d8..0b78684421f3 100644 --- a/java/org/apache/catalina/ha/session/ClusterManagerBase.java +++ b/java/org/apache/catalina/ha/session/ClusterManagerBase.java @@ -193,7 +193,9 @@ protected void clone(ClusterManagerBase copy) { copy.setMaxInactiveInterval(getMaxInactiveInterval()); copy.setProcessExpiresFrequency(getProcessExpiresFrequency()); copy.setNotifyListenersOnReplication(isNotifyListenersOnReplication()); - copy.setSessionAttributeFilter(getSessionAttributeFilter()); + copy.setSessionAttributeNameFilter(getSessionAttributeNameFilter()); + copy.setSessionAttributeValueClassNameFilter(getSessionAttributeValueClassNameFilter()); + copy.setWarnOnSessionAttributeFilterFailure(getWarnOnSessionAttributeFilterFailure()); copy.setSecureRandomClass(getSecureRandomClass()); copy.setSecureRandomProvider(getSecureRandomProvider()); copy.setSecureRandomAlgorithm(getSecureRandomAlgorithm()); diff --git a/java/org/apache/catalina/ha/session/mbeans-descriptors.xml b/java/org/apache/catalina/ha/session/mbeans-descriptors.xml index 06147f19ebdc..9f8cc80b8ffb 100644 --- a/java/org/apache/catalina/ha/session/mbeans-descriptors.xml +++ b/java/org/apache/catalina/ha/session/mbeans-descriptors.xml @@ -345,6 +345,14 @@ name="sessionAttributeNameFilter" descritpion="The string pattern used for including session attributes in replication. Null means all attributes are included." type="java.lang.String"/> + + + + + + + + + + + + + + Extend the session attribute filtering options to include filtering + based on the implementation class of the value and optional + WARN level logging if an attribute is filtered. These + options are avaialble for all of the Manager implementations that ship + with Tomcat. (markt) + diff --git a/webapps/docs/config/cluster-manager.xml b/webapps/docs/config/cluster-manager.xml index c69d8b1ceb23..941bbc18c8cf 100644 --- a/webapps/docs/config/cluster-manager.xml +++ b/webapps/docs/config/cluster-manager.xml @@ -83,17 +83,6 @@ sessions to expire on all nodes when a shutdown occurs on one node, set this value to true. Default value is false. - - A regular expression used to filter which session attributes will be - replicated. An attribute will only be replicated if its name matches - this pattern. If the pattern is zero length or null, all - attributes are eligible for replication. The pattern is anchored so the - session attribute name must fully match the pattern. As an example, the - value (userName|sessionHistory) will only replicate the - two session attributes named userName and - sessionHistory. If not specified, the default value of - null will be used. -

The initial maximum time interval, in seconds, between client requests before a session is invalidated. A negative value @@ -196,6 +185,26 @@ effective only when sendAllSessions is false. Default is 2000 milliseconds. + +

A regular expression used to filter which session attributes will be + replicated. An attribute will only be replicated if its name matches + this pattern. If the pattern is zero length or null, all + attributes are eligible for replication. The pattern is anchored so the + session attribute name must fully match the pattern. As an example, the + value (userName|sessionHistory) will only replicate the + two session attributes named userName and + sessionHistory. If not specified, the default value of + null will be used.

+
+ +

A regular expression used to filter which session attributes will be + replicated. An attribute will only be replicated if the implementation + class name of the value matches this pattern. If the pattern is zero + length or null, all attributes are eligible for + replication. The pattern is anchored so the fully qualified class name + must fully match the pattern. If not specified, the default value of + null will be used.

+
When this node sends a GET_ALL_SESSIONS message to other node, all session messages that are received as a response are queued. @@ -207,6 +216,14 @@ If set to false, all queued session messages are handled. Default is true. + +

If sessionAttributeNameFilter or + sessionAttributeValueClassNameFilter blocks an + attribute, should this be logged at WARN level? If + WARN level logging is disabled then it will be logged at + DEBUG. The default value of this attribute is + false.

+
@@ -230,6 +247,26 @@ another map. Default value is 15000 milliseconds.
+ +

A regular expression used to filter which session attributes will be + replicated. An attribute will only be replicated if its name matches + this pattern. If the pattern is zero length or null, all + attributes are eligible for replication. The pattern is anchored so the + session attribute name must fully match the pattern. As an example, the + value (userName|sessionHistory) will only replicate the + two session attributes named userName and + sessionHistory. If not specified, the default value of + null will be used.

+
+ +

A regular expression used to filter which session attributes will be + replicated. An attribute will only be replicated if the implementation + class name of the value matches this pattern. If the pattern is zero + length or null, all attributes are eligible for + replication. The pattern is anchored so the fully qualified class name + must fully match the pattern. If not specified, the default value of + null will be used.

+
Set to true if you wish to terminate replication map when replication map fails to start. If replication map is terminated, associated context @@ -237,6 +274,14 @@ does not end. It will try to join the map membership in the heartbeat. Default value is false . + +

If sessionAttributeNameFilter or + sessionAttributeValueClassNameFilter blocks an + attribute, should this be logged at WARN level? If + WARN level logging is disabled then it will be logged at + DEBUG. The default value of this attribute is + false.

+
diff --git a/webapps/docs/config/manager.xml b/webapps/docs/config/manager.xml index f76606a940ae..6b321b7b18a3 100644 --- a/webapps/docs/config/manager.xml +++ b/webapps/docs/config/manager.xml @@ -176,7 +176,7 @@
- A regular expression used to filter which session attributes will be +

A regular expression used to filter which session attributes will be distributed. An attribute will only be distributed if its name matches this pattern. If the pattern is zero length or null, all attributes are eligible for distribution. The pattern is anchored so the @@ -184,7 +184,26 @@ value (userName|sessionHistory) will only distribute the two session attributes named userName and sessionHistory. If not specified, the default value of - null will be used. + null will be used.

+
+ + +

A regular expression used to filter which session attributes will be + distributed. An attribute will only be distributed if the implementation + class name of the value matches this pattern. If the pattern is zero + length or null, all attributes are eligible for + distribution. The pattern is anchored so the fully qualified class name + must fully match the pattern. If not specified, the default value of + null will be used.

+
+ + +

If sessionAttributeNameFilter or + sessionAttributeValueClassNameFilter blocks an + attribute, should this be logged at WARN level? If + WARN level logging is disabled then it will be logged at + DEBUG. The default value of this attribute is + false.

@@ -277,7 +296,7 @@
- A regular expression used to filter which session attributes will be +

A regular expression used to filter which session attributes will be distributed. An attribute will only be distributed if its name matches this pattern. If the pattern is zero length or null, all attributes are eligible for distribution. The pattern is anchored so the @@ -285,7 +304,26 @@ value (userName|sessionHistory) will only distribute the two session attributes named userName and sessionHistory. If not specified, the default value of - null will be used. + null will be used.

+
+ + +

A regular expression used to filter which session attributes will be + distributed. An attribute will only be distributed if the implementation + class name of the value matches this pattern. If the pattern is zero + length or null, all attributes are eligible for + distribution. The pattern is anchored so the fully qualified class name + must fully match the pattern. If not specified, the default value of + null will be used.

+
+ + +

If sessionAttributeNameFilter or + sessionAttributeValueClassNameFilter blocks an + attribute, should this be logged at WARN level? If + WARN level logging is disabled then it will be logged at + DEBUG. The default value of this attribute is + false.