Bug 43866 - add support for session attribute propagation without calls to DeltaSession.setAttribute
Summary: add support for session attribute propagation without calls to DeltaSession.s...
Alias: None
Product: Tomcat 7
Classification: Unclassified
Component: Cluster (show other bugs)
Version: unspecified
Hardware: Other other
: P2 enhancement (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2007-11-14 14:57 UTC by Casey Lucas
Modified: 2018-02-26 10:01 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Casey Lucas 2007-11-14 14:57:31 UTC
This enhancement request is based on our misunderstanding of Tomcat clustering.
We were under the impression that we could use the "useDirtyFlag" attribute in
conjunction with DeltaManager to cause session replication to occur after each
request (vs only on certain requests that manipulate the session via
Session.setAttribute, etc.)  Apparently useDirtyFlag is not applicable to

In our scenario, this is problematic because we have a mutable object that is
stored in the session and manipulated after a call to Session.getAttribute but
not followed by a new call to Session.setAttribute.  Because there is no
setAttribute call, the session is not propagated.

Our "fix" was to add a call to the internal version of DeltaSession.setAttribute
(not notifying listeners) from within DeltaSession.getAttribute.  If desired and
with some direction, I could submit a patch that would make this behavior
Comment 1 Mark Thomas 2011-12-20 20:35:30 UTC
This Tomcat 5 enhancement request has been moved to Tomcat 7 (the latest version) since Tomcat 5 development is limited and focussed on bugs and security issues whereas Tomcat 7 is still seeing new feature development.
Comment 2 Mark Thomas 2018-02-15 21:36:34 UTC
I think a better way to implement this is via manager options that control calls to listeners when setAttribute() is called with the already bound value. As I looked into this I noticed some inconsistencies in the current behaviour. I've started a discussion in the dev list about how to handle this.
Comment 3 Mark Thomas 2018-02-26 10:01:01 UTC
I've added the additional configuration option to Manager for 9.0.6 onwards.

I don't propose back-porting these additions at this time.