Author: pero Date: Wed Mar 15 09:20:34 2006 New Revision: 386118 URL: http://svn.apache.org/viewcvs?rev=386118&view=rev Log: Fix that ReplicationValve set primary flag as no backup exists!
Modified: tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/LocalStrings.properties tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ReplicationValve.java tomcat/container/tc5.5.x/webapps/docs/changelog.xml Modified: tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/LocalStrings.properties URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/LocalStrings.properties?rev=386118&r1=386117&r2=386118&view=diff ============================================================================== --- tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/LocalStrings.properties (original) +++ tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/LocalStrings.properties Wed Mar 15 09:20:34 2006 @@ -48,7 +48,7 @@ ReplicationValve.send.failure=Unable to perform replication request. ReplicationValve.send.invalid.failure=Unable to send session [id={0}] invalid message over cluster. ReplicationValve.session.found=Context {0}: Found session {1} but it isn't a ClusterSession. -ReplicationValve.session.indicator=Context {0}: Primarity of session {0} in request attribute {1} is {2}. +ReplicationValve.session.indicator=Context {0}: Primarity of session {1} in request attribute {2} is {3}. ReplicationValve.session.invalid=Context {0}: Requested session {1} is invalid, removed or not replicated at this node. ReplicationValve.stats=Average request time= {0} ms for Cluster overhead time={1} ms for {2} requests {3} filter requests {4} send requests {5} cross context requests (Request={6} ms Cluster={7} ms). SimpleTcpCluster.event.log=Cluster receive listener event {0} with data {1} Modified: tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ReplicationValve.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ReplicationValve.java?rev=386118&r1=386117&r2=386118&view=diff ============================================================================== --- tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ReplicationValve.java (original) +++ tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ReplicationValve.java Wed Mar 15 09:20:34 2006 @@ -461,6 +461,8 @@ /** * Fix memory leak for long sessions with many changes, when no backup member exists! + * set primarySession flag at request session and all crossContext sessions + * @see DeltaManager#requestCompleted(String) * @param request current request after responce is generated * @param isCrossContext check crosscontext threadlocal */ @@ -468,6 +470,7 @@ Session contextSession = request.getSessionInternal(false); if(contextSession != null & contextSession instanceof DeltaSession){ resetDeltaRequest(contextSession); + ((DeltaSession)contextSession).setPrimarySession(true); } if(isCrossContext) { Object sessions = crossContextSessions.get(); @@ -477,6 +480,8 @@ for(; iter.hasNext() ;) { Session session = (Session)iter.next(); resetDeltaRequest(session); + if(session instanceof DeltaSession) + ((DeltaSession)contextSession).setPrimarySession(true); } } } Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?rev=386118&r1=386117&r2=386118&view=diff ============================================================================== --- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original) +++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Wed Mar 15 09:20:34 2006 @@ -54,6 +54,9 @@ </subsection> <subsection name="Cluster"> <changelog> + <fix> + ReplicationValve not set primarySession flag when all backup nodes gone (pero) + </fix> <update> Add DeltaSession.getLastAccessTimeInternal() without session invalidation test. (pero) </update> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]