[jboss-cvs] JBossAS SVN: r77700 - projects/cluster/ha-server-cache-jbc/trunk/src/main/java/org/jboss/web/tomcat/service/sso/jbc.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sat Aug 30 23:24:41 EDT 2008


Author: bstansberry at jboss.com
Date: 2008-08-30 23:24:41 -0400 (Sat, 30 Aug 2008)
New Revision: 77700

Modified:
   projects/cluster/ha-server-cache-jbc/trunk/src/main/java/org/jboss/web/tomcat/service/sso/jbc/JBossCacheSSOClusterManager.java
Log:
[JBCLUSTER-211] Clean up configuration; stop rejecting buddy replication

Modified: projects/cluster/ha-server-cache-jbc/trunk/src/main/java/org/jboss/web/tomcat/service/sso/jbc/JBossCacheSSOClusterManager.java
===================================================================
--- projects/cluster/ha-server-cache-jbc/trunk/src/main/java/org/jboss/web/tomcat/service/sso/jbc/JBossCacheSSOClusterManager.java	2008-08-31 03:17:08 UTC (rev 77699)
+++ projects/cluster/ha-server-cache-jbc/trunk/src/main/java/org/jboss/web/tomcat/service/sso/jbc/JBossCacheSSOClusterManager.java	2008-08-31 03:24:41 UTC (rev 77700)
@@ -132,7 +132,7 @@
    /**
     * String name to use to access the TreeCache
     */
-   private String cacheName = null;
+   private String cacheName = DEFAULT_CACHE_NAME;
 
    /**
     * ObjectName of the TreeCache if legacy JMX integration is used
@@ -224,30 +224,11 @@
    {
       return cacheName;
    }
-
-   public void setCacheName(String configName)
-      throws Exception
-   {
-      this.cacheName = configName;
-   }
    
    public String getThreadPoolName()
    {
       return threadPoolName;
    }
-
-
-   public void setThreadPoolName(String threadPoolName)
-   {
-      if (started)
-      {
-         log.info("Call to setThreadPoolName() ignored; already started");
-      }
-      else
-      {
-         this.threadPoolName = threadPoolName;
-      }
-   }
    
    public boolean isUsingThreadPool()
    {
@@ -354,6 +335,11 @@
          {
             cacheName = config;
          }
+         String poolName = ssoValve.getThreadPoolName();
+         if (poolName != null)
+         {
+            threadPoolName = poolName;
+         }
       }
    }
 
@@ -982,9 +968,7 @@
     * Obtains needed configuration information from the tree cache.
     * Invokes "getTransactionManager" on the tree cache, caching the
     * result or throwing an IllegalStateException if one is not found.
-    * Confirms that the cache is not configured for buddy replication,
-    * throwing IllegalStateException if it is. Also gets our cluster-wide 
-    * unique local address from the cache.
+    * Also gets our cluster-wide unique local address from the cache.
     * 
     * @throws Exception
     */
@@ -1000,6 +984,10 @@
                                          "TransactionManagerLookupClass");
       }
       
+      // We no longer rule out buddy replication, as it can be valid if
+      // all activity for the SSO is meant to pinned to one server (i.e.
+      // only one session, or all sessions share the same session id cookie)
+      /*
       if (cache.getConfiguration().getBuddyReplicationConfig() != null
             && cache.getConfiguration().getBuddyReplicationConfig().isEnabled())
       {
@@ -1008,6 +996,7 @@
                                          "replication with ClusteredSingleSignOn " +
                                          "is not supported");
       }
+      */
       
       // Find out our address
       Object address = cache.getLocalAddress();
@@ -1095,7 +1084,7 @@
                available = false;
             }
             
-            if (!available && getMBeanServer() != null && cacheName.indexOf(':') > -1)
+            if (!available && getMBeanServer() != null)
             {
                // See if there is a legacy JMX binding
                String onameStr = cacheName;




More information about the jboss-cvs-commits mailing list