[jboss-user] [Clustering/JBoss] - Re: Session replication - expiration

bstansberry@jboss.com do-not-reply at jboss.com
Fri May 23 12:05:18 EDT 2008


What AS version?

In 4.0.5 I added a check where if 80% of the session's maxInactiveInterval has passed since last replication, even a read request will cause the session to replicated.

There was actually a bug in 4.0.5 that that would cause it to replicate much more frequently than that (http://jira.jboss.com/jira/browse/JBAS-4428). That was fixed in 4.2.1.

I now think the standard 80% is too high. You can control that 80% value by adding a Tomcat context.xml file to your war's WEB-INF dir with a Manager element:

Context cookies="true" crossContext="true">
  |    <Manager pathname="" maxUnreplicatedFactor="10"/>   <InstanceListener>org.jboss.web.tomcat.security.RunAsListener</InstanceListener>
  |    
  | </Context>

You can also use a maxUnreplicatedInterval attribute instead of maxUnreplicatedFactor to specify the maximum unreplicated time in ms.

In AS 5 the same will exist, but I'll also replicate the timestamp of the session if it hasn't been replicated w/in 60 seconds.  In AS 5 the timestamp can be independently replicated, so aggressively replicating is less expensive than it is in AS 4.

Please note that in all these cases, it is a web request that triggers the replication; i.e. there isn't a background thread or something that does it.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4153024#4153024

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4153024



More information about the jboss-user mailing list