tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jfcl...@apache.org
Subject svn commit: r1421219 - /tomcat/sandbox/storeconfig6/trunk/src/main/java/org/apache/catalina/storeconfig/StoreRegistry.java
Date Thu, 13 Dec 2012 10:54:43 GMT
Author: jfclere
Date: Thu Dec 13 10:54:42 2012
New Revision: 1421219

URL: http://svn.apache.org/viewvc?rev=1421219&view=rev
Log:
Make the clustering classes (well any classes) optional.

Modified:
    tomcat/sandbox/storeconfig6/trunk/src/main/java/org/apache/catalina/storeconfig/StoreRegistry.java

Modified: tomcat/sandbox/storeconfig6/trunk/src/main/java/org/apache/catalina/storeconfig/StoreRegistry.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/storeconfig6/trunk/src/main/java/org/apache/catalina/storeconfig/StoreRegistry.java?rev=1421219&r1=1421218&r2=1421219&view=diff
==============================================================================
--- tomcat/sandbox/storeconfig6/trunk/src/main/java/org/apache/catalina/storeconfig/StoreRegistry.java
(original)
+++ tomcat/sandbox/storeconfig6/trunk/src/main/java/org/apache/catalina/storeconfig/StoreRegistry.java
Thu Dec 13 10:54:42 2012
@@ -17,6 +17,7 @@
 
 package org.apache.catalina.storeconfig;
 
+import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -59,12 +60,37 @@ public class StoreRegistry {
     private String version;
 
     // Access Information
-    private static Class interfaces[] = { CatalinaCluster.class,
-            ChannelSender.class, ChannelReceiver.class, Channel.class,
-            MembershipService.class, ClusterDeployer.class, Realm.class,
-            Manager.class, DirContext.class, LifecycleListener.class,
-            Valve.class, ClusterListener.class, MessageListener.class,
-            DataSender.class, ChannelInterceptor.class, Member.class };
+    private static Class interfaces[] = null;
+    private static String interfacesname[] = 
+    { 		"org.apache.catalina.ha.CatalinaCluster",
+            "org.apache.catalina.tribes.ChannelSender",
+            "org.apache.catalina.tribes.ChannelReceiver",
+            "org.apache.catalina.tribes.Channel",
+            "org.apache.catalina.tribes.MembershipService",
+            "org.apache.catalina.ha.ClusterDeployer",
+            "org.apache.catalina.Realm",
+            "org.apache.catalina.Manager",
+            "javax.naming.directory.DirContext",
+            "org.apache.catalina.LifecycleListener",
+            "org.apache.catalina.Valve",
+            "org.apache.catalina.ha.ClusterListener",
+            "org.apache.catalina.tribes.MessageListener",
+            "org.apache.catalina.tribes.DataSender",
+            "org.apache.catalina.tribes.ChannelInterceptor",
+            "org.apache.catalina.tribes.Member"};
+    
+    static {
+    	ArrayList<Class> interf = new ArrayList<Class>();
+    	for (String s: interfacesname) {
+    		try {
+				Class classz = Class.forName(s);
+				interf.add(classz);
+			} catch (Throwable e) {
+				// Ignore it.
+			}
+    	}
+    	interfaces = interf.toArray(new Class[interf.size()]);
+    }
 
     /**
      * @return Returns the name.



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message