tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Rossbach ...@objektpark.de>
Subject Re: dead code in ClusterRuleSetFactory
Date Mon, 23 Mar 2009 22:24:42 GMT
Hi David,

it ist not a dead code. Locking art sandbox OACC project we have made  
the tomcat 5.5 cluster
also available for tomcat 6.

http://svn.apache.org/repos/asf/tomcat/sandbox/tomcat-oacc/trunk/

The OACC module is very helpfull to migrations.

Peter


Am 23.03.2009 um 21:59 schrieb David Knox:

> Hi,
> I have a customer who was confused by a couple of debug log  
> messages coming from o.a.c.startup.ClusterRuleSetFactory. I found  
> the code refers to a package present in Tomcat 5 but does not exist  
> in Tomcat 6 - org.apache.catalina.cluster; which appears to be dead  
> code.
> (http://svn.apache.org/repos/asf/tomcat/archive/tc5.0.x/trunk/ 
> container/modules/cluster/)
>
> Nevertheless,
> In the interest of helping clean the code up a bit, I offer the  
> patch below. The only reason to keep it that I could imagine was  
> someone hijacking the package name (o.a.c.cluster) and their own  
> clustering implementation; which seems impractical and ambitious.
>
> cheers,
> -- dave
>
>
> Index: ClusterRuleSetFactory.java
> ===================================================================
> --- ClusterRuleSetFactory.java   (revision 757534)
> +++ ClusterRuleSetFactory.java   (working copy)
> @@ -33,22 +33,6 @@
>
>      public static RuleSetBase getClusterRuleSet(String prefix) {
>
> -        //OLD CLUSTER 1
> -        //first try the same classloader as this class server/lib
> -        try {
> -            return loadRuleSet 
> (prefix,"org.apache.catalina.cluster.ClusterRuleSet",ClusterRuleSetFac 
> tory.class.getClassLoader());
> -        } catch ( Exception x ) {
> -            //display warning
> -            if ( log.isDebugEnabled() ) log.debug("Unable to load  
> ClusterRuleSet (org.apache.catalina.cluster.ClusterRuleSet),  
> falling back on context classloader");
> -        }
> -        //try to load it from the context class loader
> -        try {
> -            return loadRuleSet 
> (prefix,"org.apache.catalina.cluster.ClusterRuleSet",Thread.currentThr 
> ead().getContextClassLoader());
> -        } catch ( Exception x ) {
> -            //display warning
> -            if ( log.isDebugEnabled() ) log.debug("Unable to load  
> ClusterRuleSet (org.apache.catalina.cluster.ClusterRuleSet), will  
> try to load the HA cluster");
> -        }
> -
>          //NEW CLUSTER 2
>          //first try the same classloader as this class server/lib
>          try {
>
>
>
>
> David Knox
> Information System Architect
> +1 303-748-8906
> http://pragmaticis.blogspot.com
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message