Author: fhanik
Date: Tue Dec 23 18:54:09 2008
New Revision: 729200
URL: http://svn.apache.org/viewvc?rev=729200&view=rev
Log:
Commit approved fix
Modified:
tomcat/tc6.0.x/trunk/STATUS.txt
tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/tcp/ReplicationValve.java
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL:
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=729200&r1=729199&r2=729200&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Dec 23 18:54:09 2008
@@ -159,11 +159,6 @@
Just did that for trunk (r711934; but it contains also other changes).
Caution: at the moment there's no @VERSION@ substitution for
service.bat.
-* Fix http://svn.apache.org/viewvc?rev=712274&view=rev
- ReplicationValve can throw NPE as context doesn't exists! (Config as Engine
level)
- +1: pero, fhanik, markt
- -1:
-
* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=42747
Ensure context.xml takes effect on first deployment. Make processing of
context.xml consistent.
Modified:
tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/tcp/ReplicationValve.java
URL:
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/tcp/ReplicationValve.java?rev=729200&r1=729199&r2=729200&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/tcp/ReplicationValve.java
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/tcp/ReplicationValve.java
Tue Dec 23 18:54:09 2008
@@ -345,24 +345,26 @@
crossContextSessions.set(new ArrayList());
}
getNext().invoke(request, response);
- Manager manager = request.getContext().getManager();
- if (manager != null && manager instanceof ClusterManager) {
- ClusterManager clusterManager = (ClusterManager) manager;
- CatalinaCluster containerCluster = (CatalinaCluster)
getContainer().getCluster();
- if (containerCluster == null) {
- if (log.isWarnEnabled())
- log.warn(sm.getString("ReplicationValve.nocluster"));
- return;
+ if(context != null) {
+ Manager manager = context.getManager();
+ if (manager != null && manager instanceof ClusterManager) {
+ ClusterManager clusterManager = (ClusterManager) manager;
+ CatalinaCluster containerCluster = (CatalinaCluster)
getContainer().getCluster();
+ if (containerCluster == null) {
+ if (log.isWarnEnabled())
+
log.warn(sm.getString("ReplicationValve.nocluster"));
+ return;
+ }
+ // valve cluster can access manager - other cluster handle
replication
+ // at host level - hopefully!
+ if(containerCluster.getManager(clusterManager.getName())
== null)
+ return ;
+ if(containerCluster.hasMembers()) {
+ sendReplicationMessage(request, totalstart,
isCrossContext, clusterManager, containerCluster);
+ } else {
+ resetReplicationRequest(request,isCrossContext);
+ }
}
- // valve cluster can access manager - other cluster handle
replication
- // at host level - hopefully!
- if(containerCluster.getManager(clusterManager.getName()) ==
null)
- return ;
- if(containerCluster.hasMembers()) {
- sendReplicationMessage(request, totalstart,
isCrossContext, clusterManager, containerCluster);
- } else {
- resetReplicationRequest(request,isCrossContext);
- }
}
} finally {
// Array must be remove: Current master request send endAccess at
recycle.
Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=729200&r1=729199&r2=729200&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Tue Dec 23 18:54:09 2008
@@ -285,6 +285,9 @@
<subsection name="Cluster">
<changelog>
<add>
+ Prevent NPE for ReplicationValve (pero)
+ </add>
+ <add>
Provide TCP only start-up option when using static membership. (fhanik)
</add>
<add>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]