tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Hanik - Dev Lists <>
Subject Re: Session values don't replicate under certain circumstances
Date Wed, 13 Aug 2008 16:31:14 GMT
that's correct. there are a number of frameworks that detect these kind 
of changes, Tomcat doesn't, everything is triggered by 


Adrian Gligor wrote:
> Hello,
> i have a working Tomcat 6.0.18 cluster with session replication using
> DeltaManager and load balancing using mod_jk. The following problem does
> not depend on having sticky sessions either on or off.
> I'm putting an object into the session, and set one of its members:
>    vo = new ValueObject();
> = "testvalue";
>    request.getSession().setAttribute("valueobject", vo);
> The object is correctly propagated onto all cluster nodes. I'm testing
> this by setting sticky sessions off and printing the node name and
> object value on each refresh. My requests bounce between the nodes as
> expected, but the value of my object stays the same.
> However, if I subsequently change the member, replication doesn't
> trigger. It's like Tomcat doesn't detect the change:
>    ValueObject vo = (ValueObject)
> request.getSession().getAttribute("valueobject");
> = "testvalue2";
> By doing this, my nodes are now out of sync. If I put the object into
> the session again (setAttribute), the changes get replicated. However, I
> have a big application here, and it would be very complicated to find
> all occurences of this pattern.
> My question is, is this behavior by design, or a bug? And is there any
> way to work around it without changing (too much) code? I would
> appreciate any hint.
> Adrian
> PS: I have attached the source code and .war file of a very simple test
> application that will demonstrate this behavior.
> ------------------------------------------------------------------------
> ---------------------------------------------------------------------
> To start a new topic, e-mail:
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message