Re: svn commit: r1825351 - in /tomcat/trunk: java/org/apache/catalina/Manager.java java/org/apache/catalina/session/ManagerBase.java java/org/apache/catalina/session/StandardSession.java webapps/docs/

2018-02-27 Thread Keiichi Fujino
2018-02-26 19:00 GMT+09:00 :

> Author: markt
> Date: Mon Feb 26 10:00:12 2018
> New Revision: 1825351
>
> URL: http://svn.apache.org/viewvc?rev=1825351=rev
> Log:
> Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=43866
> Add additional attributes to the Manager to provide control over which
> listeners are called when an attribute is added to the session when it has
> already been added under the same name. This is to aid clustering scenarios
> where setAttribute() is often called to signal that the attribute value has
> been mutated and needs to be replicated but it may not be required, or even
> desired, for the the associated listeners to be triggered. The default
> behaviour has not been changed.
>
> Modified:
> tomcat/trunk/java/org/apache/catalina/Manager.java
> tomcat/trunk/java/org/apache/catalina/session/ManagerBase.java
> tomcat/trunk/java/org/apache/catalina/session/StandardSession.java
> tomcat/trunk/webapps/docs/changelog.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=1825351=1825350=1825351=diff
> 
> ==
> --- tomcat/trunk/java/org/apache/catalina/Manager.java (original)
> +++ tomcat/trunk/java/org/apache/catalina/Manager.java Mon Feb 26
> 10:00:12 2018
> @@ -351,4 +351,73 @@ public interface Manager {
>   * otherwise {@code false}
>   */
>  public boolean willAttributeDistribute(String name, Object value);
> +
> +
> +/**
> + * When an attribute that is already present in the session is added
> again
> + * under the same name and the attribute implements {@link
> + * javax.servlet.http.HttpSessionBindingListener}, should
> + * {@link javax.servlet.http.HttpSessionBindingListener#
> valueUnbound(javax.servlet.http.HttpSessionBindingEvent)}
> + * be called followed by
> + * {@link javax.servlet.http.HttpSessionBindingListener#
> valueBound(javax.servlet.http.HttpSessionBindingEvent)}?
> + * 
> + * The default value is {@code false}.
> + *
> + * @return {@code true} if the listener will be notified, {@code
> false} if
> + * it will not
> + */
> +public default boolean getNotifyBindingListenerOnUnchangedValue() {
> +return false;
> +}
> +
> +
> +/**
> + * Configure if
> + * {@link javax.servlet.http.HttpSessionBindingListener#
> valueUnbound(javax.servlet.http.HttpSessionBindingEvent)}
> + * be called followed by
> + * {@link javax.servlet.http.HttpSessionBindingListener#
> valueBound(javax.servlet.http.HttpSessionBindingEvent)}
> + * when an attribute that is already present in the session is added
> again
> + * under the same name and the attribute implements {@link
> + * javax.servlet.http.HttpSessionBindingListener}.
> + *
> + * @param notifyBindingListenerOnUnchangedValue {@code true} the
> listener
> + *  will be called, {@code
> + *  false} it will not
> + */
> +public void setNotifyBindingListenerOnUnchangedValue(
> +boolean notifyBindingListenerOnUnchangedValue);
> +
> +
> +/**
> + * When an attribute that is already present in the session is added
> again
> + * under the same name and a {@link
> + * javax.servlet.http.HttpSessionAttributeListener} is configured
> for the
> + * session should
> + * {@link javax.servlet.http.HttpSessionAttributeListener#
> attributeReplaced(javax.servlet.http.HttpSessionBindingEvent)}
> + * be called?
> + * 
> + * The default value is {@code true}.
> + *
> + * @return {@code true} if the listener will be notified, {@code
> false} if
> + * it will not
> + */
> +public default boolean getNotifyAttributeListenerOnUnchangedValue() {
> +return true;
> +}
> +
> +
> +/**
> + * Configure if
> + * {@link javax.servlet.http.HttpSessionAttributeListener#
> attributeReplaced(javax.servlet.http.HttpSessionBindingEvent)}
> + * when an attribute that is already present in the session is added
> again
> + * under the same name and a {@link
> + * javax.servlet.http.HttpSessionAttributeListener} is configured
> for the
> + * session.
> + *
> + * @param notifyAttributeListenerOnUnchangedValue {@code true} the
> listener
> + *will be called,
> {@code
> + *false} it will not
> + */
> +public void setNotifyAttributeListenerOnUnchangedValue(
> +boolean notifyAttributeListenerOnUnchangedValue);
>  }
>
> Modified: tomcat/trunk/java/org/apache/catalina/session/ManagerBase.java
> URL: 

Re: svn commit: r1825351 - in /tomcat/trunk: java/org/apache/catalina/Manager.java java/org/apache/catalina/session/ManagerBase.java java/org/apache/catalina/session/StandardSession.java webapps/docs/

2018-02-27 Thread Bata support
There is no user named 'kfuj...@apache.org'. Either you mis-typed the name or 
that user has not yet registered for a Bugzilla account. 

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1825351 - in /tomcat/trunk: java/org/apache/catalina/Manager.java java/org/apache/catalina/session/ManagerBase.java java/org/apache/catalina/session/StandardSession.java webapps/docs/chan

2018-02-26 Thread markt
Author: markt
Date: Mon Feb 26 10:00:12 2018
New Revision: 1825351

URL: http://svn.apache.org/viewvc?rev=1825351=rev
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=43866
Add additional attributes to the Manager to provide control over which 
listeners are called when an attribute is added to the session when it has 
already been added under the same name. This is to aid clustering scenarios 
where setAttribute() is often called to signal that the attribute value has 
been mutated and needs to be replicated but it may not be required, or even 
desired, for the the associated listeners to be triggered. The default 
behaviour has not been changed.

Modified:
tomcat/trunk/java/org/apache/catalina/Manager.java
tomcat/trunk/java/org/apache/catalina/session/ManagerBase.java
tomcat/trunk/java/org/apache/catalina/session/StandardSession.java
tomcat/trunk/webapps/docs/changelog.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=1825351=1825350=1825351=diff
==
--- tomcat/trunk/java/org/apache/catalina/Manager.java (original)
+++ tomcat/trunk/java/org/apache/catalina/Manager.java Mon Feb 26 10:00:12 2018
@@ -351,4 +351,73 @@ public interface Manager {
  * otherwise {@code false}
  */
 public boolean willAttributeDistribute(String name, Object value);
+
+
+/**
+ * When an attribute that is already present in the session is added again
+ * under the same name and the attribute implements {@link
+ * javax.servlet.http.HttpSessionBindingListener}, should
+ * {@link 
javax.servlet.http.HttpSessionBindingListener#valueUnbound(javax.servlet.http.HttpSessionBindingEvent)}
+ * be called followed by
+ * {@link 
javax.servlet.http.HttpSessionBindingListener#valueBound(javax.servlet.http.HttpSessionBindingEvent)}?
+ * 
+ * The default value is {@code false}.
+ *
+ * @return {@code true} if the listener will be notified, {@code false} if
+ * it will not
+ */
+public default boolean getNotifyBindingListenerOnUnchangedValue() {
+return false;
+}
+
+
+/**
+ * Configure if
+ * {@link 
javax.servlet.http.HttpSessionBindingListener#valueUnbound(javax.servlet.http.HttpSessionBindingEvent)}
+ * be called followed by
+ * {@link 
javax.servlet.http.HttpSessionBindingListener#valueBound(javax.servlet.http.HttpSessionBindingEvent)}
+ * when an attribute that is already present in the session is added again
+ * under the same name and the attribute implements {@link
+ * javax.servlet.http.HttpSessionBindingListener}.
+ *
+ * @param notifyBindingListenerOnUnchangedValue {@code true} the listener
+ *  will be called, {@code
+ *  false} it will not
+ */
+public void setNotifyBindingListenerOnUnchangedValue(
+boolean notifyBindingListenerOnUnchangedValue);
+
+
+/**
+ * When an attribute that is already present in the session is added again
+ * under the same name and a {@link
+ * javax.servlet.http.HttpSessionAttributeListener} is configured for the
+ * session should
+ * {@link 
javax.servlet.http.HttpSessionAttributeListener#attributeReplaced(javax.servlet.http.HttpSessionBindingEvent)}
+ * be called?
+ * 
+ * The default value is {@code true}.
+ *
+ * @return {@code true} if the listener will be notified, {@code false} if
+ * it will not
+ */
+public default boolean getNotifyAttributeListenerOnUnchangedValue() {
+return true;
+}
+
+
+/**
+ * Configure if
+ * {@link 
javax.servlet.http.HttpSessionAttributeListener#attributeReplaced(javax.servlet.http.HttpSessionBindingEvent)}
+ * when an attribute that is already present in the session is added again
+ * under the same name and a {@link
+ * javax.servlet.http.HttpSessionAttributeListener} is configured for the
+ * session.
+ *
+ * @param notifyAttributeListenerOnUnchangedValue {@code true} the listener
+ *will be called, {@code
+ *false} it will not
+ */
+public void setNotifyAttributeListenerOnUnchangedValue(
+boolean notifyAttributeListenerOnUnchangedValue);
 }

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=1825351=1825350=1825351=diff
==
--- tomcat/trunk/java/org/apache/catalina/session/ManagerBase.java (original)
+++