Author: kfujino
Date: Thu Apr 3 07:06:09 2014
New Revision: 1584270
URL: http://svn.apache.org/r1584270
Log:
Remove the unnecessary cross context check.
It does not matter whether the context that is referenced by other context is
set to crossContext=true.
The context that refers to the different context must be set to
crossContext=true.
Modified:
tomcat/trunk/java/org/apache/catalina/ha/session/ClusterManagerBase.java
tomcat/trunk/webapps/docs/changelog.xml
Modified:
tomcat/trunk/java/org/apache/catalina/ha/session/ClusterManagerBase.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/session/ClusterManagerBase.java?rev=1584270&r1=1584269&r2=1584270&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/ha/session/ClusterManagerBase.java
(original)
+++ tomcat/trunk/java/org/apache/catalina/ha/session/ClusterManagerBase.java
Thu Apr 3 07:06:09 2014
@@ -24,7 +24,6 @@ import org.apache.catalina.Context;
import org.apache.catalina.LifecycleException;
import org.apache.catalina.Loader;
import org.apache.catalina.Valve;
-import org.apache.catalina.core.StandardContext;
import org.apache.catalina.ha.CatalinaCluster;
import org.apache.catalina.ha.ClusterManager;
import org.apache.catalina.ha.tcp.ReplicationValve;
@@ -208,24 +207,20 @@ public abstract class ClusterManagerBase
*/
protected void registerSessionAtReplicationValve(DeltaSession session) {
if(replicationValve == null) {
- Context context = getContext();
- if(context instanceof StandardContext &&
- ((StandardContext)context).getCrossContext()) {
- CatalinaCluster cluster = getCluster() ;
- if(cluster != null) {
- Valve[] valves = cluster.getValves();
- if(valves != null && valves.length > 0) {
- for(int i=0; replicationValve == null && i <
valves.length ; i++ ){
- if(valves[i] instanceof ReplicationValve)
replicationValve =
- (ReplicationValve)valves[i] ;
- }//for
-
- if(replicationValve == null && log.isDebugEnabled()) {
- log.debug("no ReplicationValve found for
CrossContext Support");
- }//endif
- }//end if
- }//endif
- }//end if
+ CatalinaCluster cluster = getCluster() ;
+ if(cluster != null) {
+ Valve[] valves = cluster.getValves();
+ if(valves != null && valves.length > 0) {
+ for(int i=0; replicationValve == null && i < valves.length
; i++ ){
+ if(valves[i] instanceof ReplicationValve)
replicationValve =
+ (ReplicationValve)valves[i] ;
+ }//for
+
+ if(replicationValve == null && log.isDebugEnabled()) {
+ log.debug("no ReplicationValve found for CrossContext
Support");
+ }//endif
+ }//end if
+ }//endif
}//end if
if(replicationValve != null) {
replicationValve.registerReplicationSession(session);
Modified: tomcat/trunk/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1584270&r1=1584269&r2=1584270&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Thu Apr 3 07:06:09 2014
@@ -103,6 +103,12 @@
Add support for cross context session replication to
<code>org.apache.catalina.ha.session.BackupManager</code>. (kfujino)
</fix>
+ <fix>
+ Remove the unnecessary cross context check. It does not matter whether
+ the context that is referenced by other context is set to
+ <code>crossContext</code>=true. The context that refers to the
different
+ context must be set to <code>crossContext</code>=true. (kfujino)
+ </fix>
</changelog>
</subsection>
<subsection name="Web applications">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]