[Jboss-cvs] JBossAS SVN: r56090 - trunk/cluster/src/main/org/jboss/ha/jndi

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Aug 18 19:05:51 EDT 2006


Author: bstansberry at jboss.com
Date: 2006-08-18 19:05:50 -0400 (Fri, 18 Aug 2006)
New Revision: 56090

Modified:
   trunk/cluster/src/main/org/jboss/ha/jndi/DetachedHANamingService.java
   trunk/cluster/src/main/org/jboss/ha/jndi/DetachedHANamingServiceMBean.java
Log:
[JBAS-3533] HAJNDI gets its cache via ClusterPartition

Modified: trunk/cluster/src/main/org/jboss/ha/jndi/DetachedHANamingService.java
===================================================================
--- trunk/cluster/src/main/org/jboss/ha/jndi/DetachedHANamingService.java	2006-08-18 23:05:08 UTC (rev 56089)
+++ trunk/cluster/src/main/org/jboss/ha/jndi/DetachedHANamingService.java	2006-08-18 23:05:50 UTC (rev 56090)
@@ -198,17 +198,7 @@
    {
       this.clusterPartition = clusterPartition;
    }
-   
-   public TreeCacheMBean getClusterCache()
-   {
-      return cache;
-   }
 
-   public void setClusterCache(TreeCacheMBean cache)
-   {
-      this.cache = cache;
-   }
-
    public ObjectName getProxyFactoryObjectName()
    {
       return proxyFactory;
@@ -330,22 +320,15 @@
    protected void createService()
       throws Exception
    {
-      boolean debug = log.isDebugEnabled();
-
-      if (this.clusterPartition == null)
-      {
-         partition = findHAPartitionWithName(partitionName);
-      }
-      else 
-      {
-         partition = clusterPartition.getHAPartition();
-         partitionName = partition.getPartitionName();
-      }
+      partition = clusterPartition.getHAPartition();
+      partitionName = partition.getPartitionName();
       
       if (partition == null)
          throw new IllegalStateException("Cannot find partition '" + partitionName + "'");
 
-      if (debug)
+      cache = clusterPartition.getTreeCache();
+      
+      if (log.isDebugEnabled())
          log.debug("Initializing HAJNDI server on partition: " + partitionName);       
       
       // Start HAJNDI service

Modified: trunk/cluster/src/main/org/jboss/ha/jndi/DetachedHANamingServiceMBean.java
===================================================================
--- trunk/cluster/src/main/org/jboss/ha/jndi/DetachedHANamingServiceMBean.java	2006-08-18 23:05:08 UTC (rev 56089)
+++ trunk/cluster/src/main/org/jboss/ha/jndi/DetachedHANamingServiceMBean.java	2006-08-18 23:05:50 UTC (rev 56090)
@@ -25,7 +25,6 @@
 import java.util.Map;
 import javax.management.ObjectName;
 
-import org.jboss.cache.TreeCacheMBean;
 import org.jboss.ha.framework.server.ClusterPartitionMBean;
 import org.jboss.invocation.Invocation;
 import org.jboss.util.threadpool.BasicThreadPoolMBean;
@@ -70,20 +69,6 @@
     * @param clusterPartition the partition
     */
    void setClusterPartition(ClusterPartitionMBean clusterPartition);
-   
-   /**
-    * Get the underlying cache used by this service.
-    * 
-    * @return the cache
-    */
-   TreeCacheMBean getClusterCache();
-   
-   /**
-    * Sets the underlying cache used by this service.
-    * 
-    * @param cache the cache
-    */
-   void setClusterCache(TreeCacheMBean cache);
 
    /** Get the proxy factory service name used to create the Naming transport
     * proxy.




More information about the jboss-cvs-commits mailing list