[jboss-cvs] JBossAS SVN: r69414 - in projects/cluster/ha-client/tags: 1.0.0.GA and 2 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Jan 28 22:21:15 EST 2008


Author: bstansberry at jboss.com
Date: 2008-01-28 22:21:15 -0500 (Mon, 28 Jan 2008)
New Revision: 69414

Added:
   projects/cluster/ha-client/tags/1.0.0.GA/
   projects/cluster/ha-client/tags/1.0.0.GA/pom.xml
   projects/cluster/ha-client/tags/1.0.0.GA/src/main/java/org/jboss/ha/client/loadbalance/RoundRobin.java
   projects/cluster/ha-client/tags/1.0.0.GA/src/main/java/org/jboss/ha/framework/interfaces/ClusteringTargetsRepository.java
   projects/cluster/ha-client/tags/1.0.0.GA/src/main/java/org/jboss/ha/framework/interfaces/FamilyClusterInfo.java
   projects/cluster/ha-client/tags/1.0.0.GA/src/main/java/org/jboss/ha/framework/interfaces/FamilyClusterInfoImpl.java
   projects/cluster/ha-client/tags/1.0.0.GA/src/main/java/org/jboss/ha/framework/interfaces/GenericClusteringException.java
Removed:
   projects/cluster/ha-client/tags/1.0.0.GA/pom.xml
   projects/cluster/ha-client/tags/1.0.0.GA/src/main/java/org/jboss/ha/client/loadbalance/RoundRobin.java
   projects/cluster/ha-client/tags/1.0.0.GA/src/main/java/org/jboss/ha/framework/interfaces/ClusteringTargetsRepository.java
   projects/cluster/ha-client/tags/1.0.0.GA/src/main/java/org/jboss/ha/framework/interfaces/FamilyClusterInfo.java
   projects/cluster/ha-client/tags/1.0.0.GA/src/main/java/org/jboss/ha/framework/interfaces/FamilyClusterInfoImpl.java
   projects/cluster/ha-client/tags/1.0.0.GA/src/main/java/org/jboss/ha/framework/interfaces/GenericClusteringException.java
Log:
[maven-release-plugin]  copy for tag 1.0.0.GA

Copied: projects/cluster/ha-client/tags/1.0.0.GA (from rev 69398, projects/cluster/ha-client/trunk)


Property changes on: projects/cluster/ha-client/tags/1.0.0.GA
___________________________________________________________________
Name: svn:ignore
   + .settings
target


Deleted: projects/cluster/ha-client/tags/1.0.0.GA/pom.xml
===================================================================
--- projects/cluster/ha-client/trunk/pom.xml	2008-01-28 20:53:59 UTC (rev 69398)
+++ projects/cluster/ha-client/tags/1.0.0.GA/pom.xml	2008-01-29 03:21:15 UTC (rev 69414)
@@ -1,66 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <parent>
-    <groupId>org.jboss.cluster</groupId>
-    <artifactId>jboss-cluster</artifactId>
-    <version>1.0.0.BETA3</version>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-  <groupId>org.jboss.cluster</groupId>
-  <artifactId>jboss-ha-client</artifactId>
-  <packaging>jar</packaging>
-  <version>1.0.0.BETA4-SNAPSHOT</version>
-  <name>JBoss Cluster HA Client Classes</name>
-  <url>http://www.jboss.org</url>
-  <description>A set of client-side classes commonly used by applications that want HA</description>
-  <licenses>
-   <license>
-      <name>lgpl</name>
-      <url>http://repository.jboss.com/licenses/lgpl.txt</url>
-   </license>
-  </licenses>
-  <organization>
-    <name>JBoss, a division of Red Hat, Inc.</name>
-    <url>http://www.jboss.org</url>
-  </organization>
-  
-  <scm>
-    <connection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/cluster/ha-client/trunk/</connection>
-  </scm>
-  
-  <build>
-    <plugins>
-      <plugin>
-        <artifactId>maven-release-plugin</artifactId>
-        <configuration>
-          <!-- The tagBase property is needed during the release process so that the maven release plugin
-            will create the release tag in the appropriate location. -->
-          <tagBase>https://svn.jboss.org/repos/jbossas/projects/cluster/ha-client/tags</tagBase>
-        </configuration>
-      </plugin>     
-    </plugins>
-  </build>  
-  
-  <!-- Do not add version information here, use ../build/pom.xml instead -->
-  <dependencies> 
-    <!-- Global dependencies -->
-    <dependency>
-       <groupId>org.jboss.aop</groupId>
-       <artifactId>jboss-aop</artifactId>
-       <version>${version.jboss.aop}</version>
-    </dependency>
-    <dependency>
-       <groupId>org.jboss</groupId>
-       <artifactId>jboss-common-core</artifactId>
-       <version>${version.jboss.common.core}</version>
-    </dependency>
-    <!-- Test dependencies -->
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>${version.junit}</version>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>  
-
-</project>
-

Copied: projects/cluster/ha-client/tags/1.0.0.GA/pom.xml (from rev 69413, projects/cluster/ha-client/trunk/pom.xml)
===================================================================
--- projects/cluster/ha-client/tags/1.0.0.GA/pom.xml	                        (rev 0)
+++ projects/cluster/ha-client/tags/1.0.0.GA/pom.xml	2008-01-29 03:21:15 UTC (rev 69414)
@@ -0,0 +1,66 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <parent>
+    <groupId>org.jboss.cluster</groupId>
+    <artifactId>jboss-cluster</artifactId>
+    <version>1.0.0.GA</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.jboss.cluster</groupId>
+  <artifactId>jboss-ha-client</artifactId>
+  <packaging>jar</packaging>
+  <version>1.0.0.GA</version>
+  <name>JBoss Cluster HA Client Classes</name>
+  <url>http://www.jboss.org</url>
+  <description>A set of client-side classes commonly used by applications that want HA</description>
+  <licenses>
+   <license>
+      <name>lgpl</name>
+      <url>http://repository.jboss.com/licenses/lgpl.txt</url>
+   </license>
+  </licenses>
+  <organization>
+    <name>JBoss, a division of Red Hat, Inc.</name>
+    <url>http://www.jboss.org</url>
+  </organization>
+  
+  <scm>
+    <connection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/cluster/ha-client/tags/1.0.0.GA</connection>
+  </scm>
+  
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-release-plugin</artifactId>
+        <configuration>
+          <!-- The tagBase property is needed during the release process so that the maven release plugin
+            will create the release tag in the appropriate location. -->
+          <tagBase>https://svn.jboss.org/repos/jbossas/projects/cluster/ha-client/tags</tagBase>
+        </configuration>
+      </plugin>     
+    </plugins>
+  </build>  
+  
+  <!-- Do not add version information here, use ../build/pom.xml instead -->
+  <dependencies> 
+    <!-- Global dependencies -->
+    <dependency>
+       <groupId>org.jboss.aop</groupId>
+       <artifactId>jboss-aop</artifactId>
+       <version>${version.jboss.aop}</version>
+    </dependency>
+    <dependency>
+       <groupId>org.jboss</groupId>
+       <artifactId>jboss-common-core</artifactId>
+       <version>${version.jboss.common.core}</version>
+    </dependency>
+    <!-- Test dependencies -->
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>${version.junit}</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>  
+
+</project>
+

Deleted: projects/cluster/ha-client/tags/1.0.0.GA/src/main/java/org/jboss/ha/client/loadbalance/RoundRobin.java
===================================================================
--- projects/cluster/ha-client/trunk/src/main/java/org/jboss/ha/client/loadbalance/RoundRobin.java	2008-01-28 20:53:59 UTC (rev 69398)
+++ projects/cluster/ha-client/tags/1.0.0.GA/src/main/java/org/jboss/ha/client/loadbalance/RoundRobin.java	2008-01-29 03:21:15 UTC (rev 69414)
@@ -1,86 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of
-  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-  * Lesser General Public License for more details.
-  *
-  * You should have received a copy of the GNU Lesser General Public
-  * License along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.ha.client.loadbalance;
-
-import java.util.List;
-
-import org.jboss.ha.framework.interfaces.FamilyClusterInfo;
-
-
-
-/**
- * LoadBalancePolicy implementation that always favors the next available
- * target in the list, ensuring maximum load balancing always occurs.
- * <p>
- * Different instances of this class will coordinate their target
- * selection via the 
- * {@link FamilyClusterInfo#getCursor() FamilyClusterInfo cursor}, so if
- * proxy A makes the first call to target 1, and proxy B makes the next 
- * call, it will invoke on target 2; the third call will go to
- * target 3 no matter which proxy makes it, and so on. 
- * </p>
- *
- * @see org.jboss.ha.client.loadbalance.LoadBalancePolicy
- * @see org.jboss.ha.framework.interfaces.FamilyClusterInfo#getCursor()
- *
- * @author <a href="mailto:sacha.labourey at cogito-info.ch">Sacha Labourey</a>.
- * @author <a href="mailto:bill at burkecentral.com">Bill Burke</a>.
- * @version $Revision: 57642 $
- */
-public class RoundRobin implements LoadBalancePolicy
-{
-   // Constants -----------------------------------------------------
-   /** @since 1.3.4.2 */
-   private static final long serialVersionUID = 8660076707279597114L;
-
-   // Attributes ----------------------------------------------------
-   
-   // Static --------------------------------------------------------
-   
-   // Constructors --------------------------------------------------
-       
-   // Public --------------------------------------------------------
-   
-   public Object chooseTarget (FamilyClusterInfo clusterFamily)
-   {
-      int cursor = clusterFamily.getCursor ();
-      List targets = clusterFamily.getTargets ();
-
-      if (targets.size () == 0)
-         return null;
-      
-      if (cursor == FamilyClusterInfo.UNINITIALIZED_CURSOR)
-      {         
-         // Obtain a random index into targets
-         cursor = RandomRobin.localRandomizer.nextInt(targets.size());
-      }
-      else
-      {
-         // Choose the next target
-         cursor = ( (cursor + 1) % targets.size() );
-      }
-      clusterFamily.setCursor (cursor);
-
-      return targets.get(cursor);
-   }
-
-}

Copied: projects/cluster/ha-client/tags/1.0.0.GA/src/main/java/org/jboss/ha/client/loadbalance/RoundRobin.java (from rev 69400, projects/cluster/ha-client/trunk/src/main/java/org/jboss/ha/client/loadbalance/RoundRobin.java)
===================================================================
--- projects/cluster/ha-client/tags/1.0.0.GA/src/main/java/org/jboss/ha/client/loadbalance/RoundRobin.java	                        (rev 0)
+++ projects/cluster/ha-client/tags/1.0.0.GA/src/main/java/org/jboss/ha/client/loadbalance/RoundRobin.java	2008-01-29 03:21:15 UTC (rev 69414)
@@ -0,0 +1,91 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+package org.jboss.ha.client.loadbalance;
+
+import java.util.List;
+
+import org.jboss.ha.framework.interfaces.FamilyClusterInfo;
+
+
+
+/**
+ * LoadBalancePolicy implementation that always favors the next available
+ * target in the list, ensuring maximum load balancing always occurs.
+ * <p>
+ * Different instances of this class will coordinate their target
+ * selection via the 
+ * {@link FamilyClusterInfo#getCursor() FamilyClusterInfo cursor}, so if
+ * proxy A makes the first call to target 1, and proxy B makes the next 
+ * call, it will invoke on target 2; the third call will go to
+ * target 3 no matter which proxy makes it, and so on. 
+ * </p>
+ * <p>
+ * The first target in the round-robin is chosen randomly, ensuring that
+ * proper load balancing occurs when many clients in different VM's download
+ * the proxy.
+ * </p>
+ *
+ * @see org.jboss.ha.client.loadbalance.LoadBalancePolicy
+ * @see org.jboss.ha.framework.interfaces.FamilyClusterInfo#getCursor()
+ *
+ * @author <a href="mailto:sacha.labourey at cogito-info.ch">Sacha Labourey</a>.
+ * @author <a href="mailto:bill at burkecentral.com">Bill Burke</a>.
+ * @version $Revision: 57642 $
+ */
+public class RoundRobin implements LoadBalancePolicy
+{
+   // Constants -----------------------------------------------------
+   /** @since 1.3.4.2 */
+   private static final long serialVersionUID = 8660076707279597114L;
+
+   // Attributes ----------------------------------------------------
+   
+   // Static --------------------------------------------------------
+   
+   // Constructors --------------------------------------------------
+       
+   // Public --------------------------------------------------------
+   
+   public Object chooseTarget (FamilyClusterInfo clusterFamily)
+   {
+      int cursor = clusterFamily.getCursor ();
+      List targets = clusterFamily.getTargets ();
+
+      if (targets.size () == 0)
+         return null;
+      
+      if (cursor == FamilyClusterInfo.UNINITIALIZED_CURSOR)
+      {         
+         // Obtain a random index into targets
+         cursor = RandomRobin.localRandomizer.nextInt(targets.size());
+      }
+      else
+      {
+         // Choose the next target
+         cursor = ( (cursor + 1) % targets.size() );
+      }
+      clusterFamily.setCursor (cursor);
+
+      return targets.get(cursor);
+   }
+
+}

Deleted: projects/cluster/ha-client/tags/1.0.0.GA/src/main/java/org/jboss/ha/framework/interfaces/ClusteringTargetsRepository.java
===================================================================
--- projects/cluster/ha-client/trunk/src/main/java/org/jboss/ha/framework/interfaces/ClusteringTargetsRepository.java	2008-01-28 20:53:59 UTC (rev 69398)
+++ projects/cluster/ha-client/tags/1.0.0.GA/src/main/java/org/jboss/ha/framework/interfaces/ClusteringTargetsRepository.java	2008-01-29 03:21:15 UTC (rev 69414)
@@ -1,135 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of
-  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-  * Lesser General Public License for more details.
-  *
-  * You should have received a copy of the GNU Lesser General Public
-  * License along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.ha.framework.interfaces;
-
-import java.util.Hashtable;
-import java.util.List;
-
-/**
- * JVM singleton that associates a list of targets (+ other info) 
- * contained in a FamilyClusterInfo to a proxy family. For example
- * All remote proxies for a given EJB in a given cluster are part of the
- * same proxy family. Note that home and remote for a same EJB form *2*
- * proxy families.
- *
- * @see org.jboss.ha.framework.interfaces.FamilyClusterInfo
- * @see org.jboss.ha.framework.interfaces.FamilyClusterInfoImpl
- *
- * @author  <a href="mailto:sacha.labourey at cogito-info.ch">Sacha Labourey</a>.
- * @version $Revision$
- *
- * <p><b>Revisions:</b>
- *
- * <p><b>2002/08/23, Sacha Labourey:</b>
- * <ul>
- * <li> First implementation </li>
- * </ul>
- */
-
-public class ClusteringTargetsRepository
-{
-   // Constants -----------------------------------------------------
-   
-   // Attributes ----------------------------------------------------
-   
-   protected static Hashtable families = new Hashtable ();
-   
-   // Static --------------------------------------------------------
-   
-   /**
-    * Same as {@link #initTarget(String, List, long) initTarget(familyName, targets, 0L)}
-    */
-   public synchronized static FamilyClusterInfo initTarget (String familyName, List targets)
-   {
-      return initTarget (familyName, targets, 0L);
-   }
-   
-   /**
-    * Checks for the existence of a {@link FamilyClusterInfo} with the given name.  If
-    * found, {@link FamilyClusterInfo#updateClusterInfo(List, long) updates} it; otherwise
-    * creates and caches a new FamilyClusterInfo.
-    * <p>
-    * This method must be synchronized to avoid race conditions leading to
-    * multiple FamilyClusterInfo instances for the same <code>familyName</code>.
-    * </p>
-    * 
-    * @param familyName  the name of the proxy family
-    * @param targets     the current list of targets for the proxy family
-    * @param viewId      long that can be used as a shorthand identifier
-    *                    for the list of targets
-    *                    
-    * @return a {@link FamilyClusterInfo} encapsulating the current state of the <code>familyName</code>.
-    */
-   public synchronized static FamilyClusterInfo initTarget (String familyName, List targets, long viewId)
-   {
-      // this method must be somehow synchronized to avoid multiple FamilyClusterInfoImpl 
-      // for the same familyName in multi-threaded app accessing the same bean
-      //
-      FamilyClusterInfoImpl family = (FamilyClusterInfoImpl)families.get (familyName);
-      if (family == null)
-      {
-         family = new FamilyClusterInfoImpl (familyName, targets, viewId);
-         families.put (familyName, family);         
-      }
-      else
-      {
-         // no need to initialize: it is already done: we keep the same object
-         //
-         family.updateClusterInfo (targets, viewId); // should not happen: possible if redeploy after undeploy fails
-      }
-         
-      return family;
-         
-   }
-   
-   /**
-    * Gets the {@link FamilyClusterInfo} registered under <code>familyName</code>.
-    * 
-    * @param familyName the identifier of the FamilyClusterInfo
-    * 
-    * @return the FamilyClusterInfo, or <code>null</code> if none is registered
-    */
-   public static FamilyClusterInfo getFamilyClusterInfo (String familyName)
-   {
-      return (FamilyClusterInfo)families.get (familyName);
-   }
-   
-   // Constructors --------------------------------------------------
-   
-   /** Prevent external instantiation */
-   private ClusteringTargetsRepository () {}
-   
-   // Public --------------------------------------------------------
-   
-   // Z implementation ----------------------------------------------
-   
-   // Y overrides ---------------------------------------------------
-   
-   // Package protected ---------------------------------------------
-   
-   // Protected -----------------------------------------------------
-   
-   // Private -------------------------------------------------------
-   
-   // Inner classes -------------------------------------------------
-   
-}

Copied: projects/cluster/ha-client/tags/1.0.0.GA/src/main/java/org/jboss/ha/framework/interfaces/ClusteringTargetsRepository.java (from rev 69400, projects/cluster/ha-client/trunk/src/main/java/org/jboss/ha/framework/interfaces/ClusteringTargetsRepository.java)
===================================================================
--- projects/cluster/ha-client/tags/1.0.0.GA/src/main/java/org/jboss/ha/framework/interfaces/ClusteringTargetsRepository.java	                        (rev 0)
+++ projects/cluster/ha-client/tags/1.0.0.GA/src/main/java/org/jboss/ha/framework/interfaces/ClusteringTargetsRepository.java	2008-01-29 03:21:15 UTC (rev 69414)
@@ -0,0 +1,135 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+package org.jboss.ha.framework.interfaces;
+
+import java.util.Hashtable;
+import java.util.List;
+
+/**
+ * JVM singleton that associates a list of targets (+ other info) 
+ * contained in a {@link FamilyClusterInfo} to a proxy family. For example,
+ * all remote proxies for a given EJB in a given cluster are part of the
+ * same proxy family. Note that home and remote for a same EJB form *2*
+ * proxy families.
+ *
+ * @see org.jboss.ha.framework.interfaces.FamilyClusterInfo
+ * @see org.jboss.ha.framework.interfaces.FamilyClusterInfoImpl
+ *
+ * @author  <a href="mailto:sacha.labourey at cogito-info.ch">Sacha Labourey</a>.
+ * @version $Revision$
+ *
+ * <p><b>Revisions:</b>
+ *
+ * <p><b>2002/08/23, Sacha Labourey:</b>
+ * <ul>
+ * <li> First implementation </li>
+ * </ul>
+ */
+
+public class ClusteringTargetsRepository
+{
+   // Constants -----------------------------------------------------
+   
+   // Attributes ----------------------------------------------------
+   
+   protected static Hashtable families = new Hashtable ();
+   
+   // Static --------------------------------------------------------
+   
+   /**
+    * Same as {@link #initTarget(String, List, long) initTarget(familyName, targets, 0L)}
+    */
+   public synchronized static FamilyClusterInfo initTarget (String familyName, List targets)
+   {
+      return initTarget (familyName, targets, 0L);
+   }
+   
+   /**
+    * Checks for the existence of a {@link FamilyClusterInfo} with the given name.  If
+    * found, {@link FamilyClusterInfo#updateClusterInfo(List, long) updates} it; otherwise
+    * creates and caches a new FamilyClusterInfo.
+    * <p>
+    * This method must be synchronized to avoid race conditions leading to
+    * multiple FamilyClusterInfo instances for the same <code>familyName</code>.
+    * </p>
+    * 
+    * @param familyName  the name of the proxy family
+    * @param targets     the current list of targets for the proxy family
+    * @param viewId      long that can be used as a shorthand identifier
+    *                    for the list of targets
+    *                    
+    * @return a {@link FamilyClusterInfo} encapsulating the current state of the <code>familyName</code>.
+    */
+   public synchronized static FamilyClusterInfo initTarget (String familyName, List targets, long viewId)
+   {
+      // this method must be somehow synchronized to avoid multiple FamilyClusterInfoImpl 
+      // for the same familyName in multi-threaded app accessing the same bean
+      //
+      FamilyClusterInfoImpl family = (FamilyClusterInfoImpl)families.get (familyName);
+      if (family == null)
+      {
+         family = new FamilyClusterInfoImpl (familyName, targets, viewId);
+         families.put (familyName, family);         
+      }
+      else
+      {
+         // no need to initialize: it is already done: we keep the same object
+         //
+         family.updateClusterInfo (targets, viewId); // should not happen: possible if redeploy after undeploy fails
+      }
+         
+      return family;
+         
+   }
+   
+   /**
+    * Gets the {@link FamilyClusterInfo} registered under <code>familyName</code>.
+    * 
+    * @param familyName the identifier of the FamilyClusterInfo
+    * 
+    * @return the FamilyClusterInfo, or <code>null</code> if none is registered
+    */
+   public static FamilyClusterInfo getFamilyClusterInfo (String familyName)
+   {
+      return (FamilyClusterInfo)families.get (familyName);
+   }
+   
+   // Constructors --------------------------------------------------
+   
+   /** Prevent external instantiation */
+   private ClusteringTargetsRepository () {}
+   
+   // Public --------------------------------------------------------
+   
+   // Z implementation ----------------------------------------------
+   
+   // Y overrides ---------------------------------------------------
+   
+   // Package protected ---------------------------------------------
+   
+   // Protected -----------------------------------------------------
+   
+   // Private -------------------------------------------------------
+   
+   // Inner classes -------------------------------------------------
+   
+}

Deleted: projects/cluster/ha-client/tags/1.0.0.GA/src/main/java/org/jboss/ha/framework/interfaces/FamilyClusterInfo.java
===================================================================
--- projects/cluster/ha-client/trunk/src/main/java/org/jboss/ha/framework/interfaces/FamilyClusterInfo.java	2008-01-28 20:53:59 UTC (rev 69398)
+++ projects/cluster/ha-client/tags/1.0.0.GA/src/main/java/org/jboss/ha/framework/interfaces/FamilyClusterInfo.java	2008-01-29 03:21:15 UTC (rev 69414)
@@ -1,102 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of
-  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-  * Lesser General Public License for more details.
-  *
-  * You should have received a copy of the GNU Lesser General Public
-  * License along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.ha.framework.interfaces;
-
-import java.util.List;
-
-/**
- * Maintain information for a given proxy family. Proxies can statically reference
- * objects implementing this interface: only the content will change as the 
- * cluster topology changes, not the FamilyClusterInfo object itself.
- * Proxies or LoadBalancing policy implementations can use the cursor and object
- * attribute to store arbitrary data that is then shared accross all proxies belonging
- * to the same family. 
- * Initial access to this object is done through the ClusteringTargetsRepository singleton.
- *
- * @see org.jboss.ha.framework.interfaces.FamilyClusterInfoImpl
- * @see org.jboss.ha.framework.interfaces.ClusteringTargetsRepository
- *
- * @author  <a href="mailto:sacha.labourey at cogito-info.ch">Sacha Labourey</a>.
- * @version $Revision$
- *
- * <p><b>Revisions:</b>
- *
- * <p><b>2002/08/23, Sacha Labourey:</b>
- * <ul>
- * <li> First implementation </li>
- * </ul>
- */
-
-public interface FamilyClusterInfo
-{
-   public String getFamilyName ();
-   
-   /**
-    * Gets the list of targets for this family.
-    * 
-    * <strong>NOTE:</strong> Implementations should synchronize on themselves 
-    * when executing this method (see JBAS-2071).
-    */
-   public List getTargets ();
-   public long getCurrentViewId ();
-   
-   /**
-    * Remove the given target from the list of targets.
-    * 
-    * <strong>NOTE:</strong> Implementations should synchronize on themselves 
-    * when executing this method (see JBAS-2071).
-    * 
-    * @param target the target
-    * @return the updated list of targets
-    */
-   public List removeDeadTarget(Object target);
-   
-   /**
-    * Updates the targets and the view id.
-    * 
-    * <strong>NOTE:</strong> Implementations should synchronize on themselves 
-    * when executing this method (see JBAS-2071).
-    */
-   public List updateClusterInfo (List targets, long viewId);
-   
-   public boolean currentMembershipInSyncWithViewId();
-   
-   /**
-    * Force a reload of the view at the next invocation.
-    * 
-    * <strong>NOTE:</strong> Implementations should synchronize on themselves 
-    * when executing this method (see JBAS-2071).
-    */
-   public void resetView ();
-   
-   // arbitrary usage by the LoadBalancePolicy implementation
-   // We could have used an HashMap but the lookup would have taken
-   // much more time and we probably don't need as much flexibility
-   // (+ it is slow for a simple int)
-   //
-   public int getCursor();
-   public int setCursor (int cursor);
-   public Object getObject ();
-   public Object setObject (Object whatever);
-   
-   public final static int UNINITIALIZED_CURSOR = 999999999;
-}

Copied: projects/cluster/ha-client/tags/1.0.0.GA/src/main/java/org/jboss/ha/framework/interfaces/FamilyClusterInfo.java (from rev 69400, projects/cluster/ha-client/trunk/src/main/java/org/jboss/ha/framework/interfaces/FamilyClusterInfo.java)
===================================================================
--- projects/cluster/ha-client/tags/1.0.0.GA/src/main/java/org/jboss/ha/framework/interfaces/FamilyClusterInfo.java	                        (rev 0)
+++ projects/cluster/ha-client/tags/1.0.0.GA/src/main/java/org/jboss/ha/framework/interfaces/FamilyClusterInfo.java	2008-01-29 03:21:15 UTC (rev 69414)
@@ -0,0 +1,167 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+package org.jboss.ha.framework.interfaces;
+
+import java.util.List;
+
+import org.jboss.ha.client.loadbalance.FirstAvailableIdenticalAllProxies;
+import org.jboss.ha.client.loadbalance.RoundRobin;
+
+/**
+ * Maintain information for a given proxy family. Proxies can statically reference
+ * objects implementing this interface: only the content will change as the 
+ * cluster topology changes, not the FamilyClusterInfo object itself.
+ * Proxies or LoadBalancing policy implementations can use the cursor and object
+ * attribute to store arbitrary data that is then shared accross all proxies belonging
+ * to the same family. 
+ * Initial access to this object is done through the 
+ * {@link ClusteringTargetsRepository} singleton.
+ *
+ * @see org.jboss.ha.framework.interfaces.FamilyClusterInfoImpl
+ * @see org.jboss.ha.framework.interfaces.ClusteringTargetsRepository
+ *
+ * @author  <a href="mailto:sacha.labourey at cogito-info.ch">Sacha Labourey</a>.
+ * @version $Revision$
+ *
+ * <p><b>Revisions:</b>
+ *
+ * <p><b>2002/08/23, Sacha Labourey:</b>
+ * <ul>
+ * <li> First implementation </li>
+ * </ul>
+ */
+
+public interface FamilyClusterInfo
+{
+   public String getFamilyName ();
+   
+   /**
+    * Gets the list of targets for this family.
+    * 
+    * <strong>NOTE:</strong> Implementations should synchronize on themselves 
+    * when executing this method (see JBAS-2071).
+    */
+   public List getTargets ();
+   
+   /**
+    * Gets a shorthand identifier for the current cluster topology for
+    * the clustered service represented by this object. The identifer is
+    * generated on the server side; clients can pass this view id to the
+    * server side to check whether their current view of the service
+    * topology matches what the server sees.
+    */
+   public long getCurrentViewId ();
+   
+   /**
+    * Remove the given target from the list of targets.
+    * 
+    * <strong>NOTE:</strong> Implementations should synchronize on themselves 
+    * when executing this method (see JBAS-2071).
+    * 
+    * @param target the target
+    * @return the updated list of targets
+    */
+   public List removeDeadTarget(Object target);
+   
+   /**
+    * Updates the targets and the view id.
+    * 
+    * <strong>NOTE:</strong> Implementations should synchronize on themselves 
+    * when executing this method (see JBAS-2071).
+    */
+   public List updateClusterInfo (List targets, long viewId);
+   
+   /**
+    * Gets whether this object believes its current 
+    * {@link #getTargets() target list} matches what the server-side
+    * used to generate the {@link #getCurrentViewId() view id}.
+    * <p>
+    * Generally, a call to {@link #removeDeadTarget(Object)} would cause
+    * this method to return <code>false</code> until a subsequent call
+    * to {@link #updateClusterInfo(List, long)} is made.
+    * </p>
+    */
+   public boolean currentMembershipInSyncWithViewId();
+   
+   /**
+    * Force a reload of the view at the next invocation.
+    * 
+    * <strong>NOTE:</strong> Implementations should synchronize on themselves 
+    * when executing this method (see JBAS-2071).
+    */
+   public void resetView ();
+   
+   /**
+    * Gets a cursor indicating a position in the current 
+    * {@link #getTargets() list of targets}. Useful for round-robin load
+    * balancing strategies that wish to coordinate between instances.
+    * <p>
+    * It is not guaranteed that the returned value will be less than the size
+    * of the target list; callers need to verify that themselves.
+    * </p>
+    * 
+    * @see #UNINITIALIZED_CURSOR
+    * @see RoundRobin
+    */
+   public int getCursor();
+   
+   /**
+    * Sets a cursor indicating a position in the current 
+    * {@link #getTargets() list of targets}. Useful for round-robin load
+    * balancing strategies that wish to coordinate between instances.
+    * 
+    * @param
+    */
+   public int setCursor (int cursor);
+   
+   /**
+    * Gets an object that may be one of the members of the current
+    * {@link #getTargets() list of targets}. Useful for "sticky" load
+    * balancing strategies that wish to coordinate between instances.
+    * <p>
+    * It is not guaranteed that the returned object will be a current member of
+    * the target list; callers need to verify that themselves.
+    * </p>
+    * 
+    * @return an object that *may* be an element in the target list, or 
+    *         may be <code>null</code>
+    *         
+    * @see FirstAvailableIdenticalAllProxies       
+    */
+   public Object getObject();
+   
+   /**
+    * Sets the member of the current {@link #getTargets() list of targets}
+    * that "sticky" load balancing strategies that wish to coordinate between 
+    * instances should use.
+    * 
+    * @param  whatever *should* be a member of the current list of targets, or
+    *                  <code>null</code>. However, this requirement is not
+    *                  enforced.      
+    */
+   public Object setObject(Object whatever);
+   
+   /**
+    * Initial value returned by {@link #getCursor()}.
+    */
+   public final static int UNINITIALIZED_CURSOR = 999999999;
+}

Deleted: projects/cluster/ha-client/tags/1.0.0.GA/src/main/java/org/jboss/ha/framework/interfaces/FamilyClusterInfoImpl.java
===================================================================
--- projects/cluster/ha-client/trunk/src/main/java/org/jboss/ha/framework/interfaces/FamilyClusterInfoImpl.java	2008-01-28 20:53:59 UTC (rev 69398)
+++ projects/cluster/ha-client/tags/1.0.0.GA/src/main/java/org/jboss/ha/framework/interfaces/FamilyClusterInfoImpl.java	2008-01-29 03:21:15 UTC (rev 69414)
@@ -1,184 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of
-  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-  * Lesser General Public License for more details.
-  *
-  * You should have received a copy of the GNU Lesser General Public
-  * License along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.ha.framework.interfaces;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-/**
- * Default implementation of FamilyClusterInfo
- *
- * @see org.jboss.ha.framework.interfaces.FamilyClusterInfo
- * @see org.jboss.ha.framework.interfaces.ClusteringTargetsRepository
- *
- * @author  <a href="mailto:sacha.labourey at cogito-info.ch">Sacha Labourey</a>.
- * @version $Revision$
- */
-public class FamilyClusterInfoImpl implements FamilyClusterInfo
-{
-   
-   // Constants -----------------------------------------------------
-   
-   // Attributes ----------------------------------------------------
-   
-   private String familyName = null;
-   private ArrayList targets = null;
-   private long currentViewId = 0;
-   private boolean isViewMembersInSyncWithViewId = false;
-   
-   private int cursor = FamilyClusterInfo.UNINITIALIZED_CURSOR;
-   private Object arbitraryObject = null;
-      
-   // Static --------------------------------------------------------
-    
-   // Constructors --------------------------------------------------
-   
-   protected FamilyClusterInfoImpl (String familyName, List targets, long viewId)
-   {
-      this.familyName = familyName;
-      this.targets = cloneList(targets);
-      this.currentViewId = viewId;
-      
-      this.isViewMembersInSyncWithViewId = false;
-   }
-
-   // Public --------------------------------------------------------
-   
-   // FamilyClusterInfo implementation ----------------------------------------------
-   
-   public String getFamilyName () { return this.familyName; }
-   
-   /**
-    * Returns an unmodifiable view of the target list.
-    * 
-    * @see Collections#unmodifiableList(List)
-    */
-   public synchronized List getTargets () 
-   { 
-      return Collections.unmodifiableList(this.targets); 
-   }
-   public long getCurrentViewId () { return this.currentViewId; }
-   public int getCursor () { return this.cursor; }
-   public int setCursor (int cursor) { return (this.cursor = cursor);}
-   public Object getObject () { return this.arbitraryObject; }
-   public Object setObject (Object whatever) { this.arbitraryObject = whatever; return this.arbitraryObject; }
-   
-   public List removeDeadTarget(Object target)
-   {
-      synchronized (this)
-      {
-         ArrayList tmp = (ArrayList) targets.clone();
-         tmp.remove (target);
-         this.targets = tmp;
-         this.isViewMembersInSyncWithViewId = false;
-         return Collections.unmodifiableList(this.targets);
-      }      
-   }
-   
-   public List updateClusterInfo (List targets, long viewId)
-   {
-      synchronized (this)
-      {
-         this.targets = cloneList(targets);
-         this.currentViewId = viewId;
-         this.isViewMembersInSyncWithViewId = true;
-         return Collections.unmodifiableList(this.targets);
-      }
-   }
-      
-   public boolean currentMembershipInSyncWithViewId ()
-   {
-      return this.isViewMembersInSyncWithViewId;
-   }
-   
-   public void resetView ()
-   {
-      synchronized (this)
-      {
-         this.currentViewId = -1;
-         this.isViewMembersInSyncWithViewId = false;
-      }
-   }
-      
-   // Object overrides ---------------------------------------------------
-   
-   public int hashCode()
-   {
-      return this.familyName.hashCode ();
-   }
-   
-   public boolean equals (Object o)
-   {
-      if (o instanceof FamilyClusterInfoImpl)
-      {
-         FamilyClusterInfoImpl fr = (FamilyClusterInfoImpl)o;
-         return fr.familyName == this.familyName;
-      }
-      else
-         return false;         
-   }
-
-   public String toString()
-   {
-      StringBuffer tmp = new StringBuffer(super.toString());
-      tmp.append("{familyName=");
-      tmp.append(familyName);
-      tmp.append(",targets=");
-      tmp.append(targets);
-      tmp.append(",currentViewId=");
-      tmp.append(currentViewId);
-      tmp.append(",isViewMembersInSyncWithViewId=");
-      tmp.append(isViewMembersInSyncWithViewId);
-      tmp.append(",cursor=");
-      tmp.append(cursor);
-      tmp.append(",arbitraryObject=");
-      tmp.append(arbitraryObject);
-      tmp.append("}");
-      return tmp.toString();
-   }
-   // Package protected ---------------------------------------------
-   
-   // Protected -----------------------------------------------------
-   
-   // Private -------------------------------------------------------
-   
-   // Inner classes -------------------------------------------------
-
-   private static ArrayList cloneList(List toClone)
-   {
-      if (toClone instanceof ArrayList)
-      {
-      	 synchronized (toClone)
-      	 {
-         	return (ArrayList) ((ArrayList) toClone).clone();
-         }
-      }
-      
-      ArrayList clone = new ArrayList(toClone.size());
-      synchronized (toClone)
-      {
-      	clone.addAll(toClone);
-      }
-      return clone;      
-   }
-}

Copied: projects/cluster/ha-client/tags/1.0.0.GA/src/main/java/org/jboss/ha/framework/interfaces/FamilyClusterInfoImpl.java (from rev 69401, projects/cluster/ha-client/trunk/src/main/java/org/jboss/ha/framework/interfaces/FamilyClusterInfoImpl.java)
===================================================================
--- projects/cluster/ha-client/tags/1.0.0.GA/src/main/java/org/jboss/ha/framework/interfaces/FamilyClusterInfoImpl.java	                        (rev 0)
+++ projects/cluster/ha-client/tags/1.0.0.GA/src/main/java/org/jboss/ha/framework/interfaces/FamilyClusterInfoImpl.java	2008-01-29 03:21:15 UTC (rev 69414)
@@ -0,0 +1,184 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+package org.jboss.ha.framework.interfaces;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * Default implementation of FamilyClusterInfo
+ *
+ * @see org.jboss.ha.framework.interfaces.FamilyClusterInfo
+ * @see org.jboss.ha.framework.interfaces.ClusteringTargetsRepository
+ *
+ * @author  <a href="mailto:sacha.labourey at cogito-info.ch">Sacha Labourey</a>.
+ * @version $Revision$
+ */
+public class FamilyClusterInfoImpl implements FamilyClusterInfo
+{
+   
+   // Constants -----------------------------------------------------
+   
+   // Attributes ----------------------------------------------------
+   
+   private String familyName = null;
+   private ArrayList targets = null;
+   private long currentViewId = 0;
+   private boolean isViewMembersInSyncWithViewId = false;
+   
+   private int cursor = FamilyClusterInfo.UNINITIALIZED_CURSOR;
+   private Object arbitraryObject = null;
+      
+   // Static --------------------------------------------------------
+    
+   // Constructors --------------------------------------------------
+   
+   protected FamilyClusterInfoImpl (String familyName, List targets, long viewId)
+   {
+      this.familyName = familyName;
+      this.targets = cloneList(targets);
+      this.currentViewId = viewId;
+      
+      this.isViewMembersInSyncWithViewId = true;
+   }
+
+   // Public --------------------------------------------------------
+   
+   // FamilyClusterInfo implementation ----------------------------------------------
+   
+   public String getFamilyName () { return this.familyName; }
+   
+   /**
+    * Returns an unmodifiable view of the target list.
+    * 
+    * @see Collections#unmodifiableList(List)
+    */
+   public synchronized List getTargets () 
+   { 
+      return Collections.unmodifiableList(this.targets); 
+   }
+   public long getCurrentViewId () { return this.currentViewId; }
+   public int getCursor () { return this.cursor; }
+   public int setCursor (int cursor) { return (this.cursor = cursor);}
+   public Object getObject () { return this.arbitraryObject; }
+   public Object setObject (Object whatever) { this.arbitraryObject = whatever; return this.arbitraryObject; }
+   
+   public List removeDeadTarget(Object target)
+   {
+      synchronized (this)
+      {
+         ArrayList tmp = (ArrayList) targets.clone();
+         tmp.remove (target);
+         this.targets = tmp;
+         this.isViewMembersInSyncWithViewId = false;
+         return Collections.unmodifiableList(this.targets);
+      }      
+   }
+   
+   public List updateClusterInfo (List targets, long viewId)
+   {
+      synchronized (this)
+      {
+         this.targets = cloneList(targets);
+         this.currentViewId = viewId;
+         this.isViewMembersInSyncWithViewId = true;
+         return Collections.unmodifiableList(this.targets);
+      }
+   }
+      
+   public boolean currentMembershipInSyncWithViewId ()
+   {
+      return this.isViewMembersInSyncWithViewId;
+   }
+   
+   public void resetView ()
+   {
+      synchronized (this)
+      {
+         this.currentViewId = -1;
+         this.isViewMembersInSyncWithViewId = false;
+      }
+   }
+      
+   // Object overrides ---------------------------------------------------
+   
+   public int hashCode()
+   {
+      return this.familyName.hashCode ();
+   }
+   
+   public boolean equals (Object o)
+   {
+      if (o instanceof FamilyClusterInfoImpl)
+      {
+         FamilyClusterInfoImpl fr = (FamilyClusterInfoImpl)o;
+         return fr.familyName == this.familyName;
+      }
+      else
+         return false;         
+   }
+
+   public String toString()
+   {
+      StringBuffer tmp = new StringBuffer(super.toString());
+      tmp.append("{familyName=");
+      tmp.append(familyName);
+      tmp.append(",targets=");
+      tmp.append(targets);
+      tmp.append(",currentViewId=");
+      tmp.append(currentViewId);
+      tmp.append(",isViewMembersInSyncWithViewId=");
+      tmp.append(isViewMembersInSyncWithViewId);
+      tmp.append(",cursor=");
+      tmp.append(cursor);
+      tmp.append(",arbitraryObject=");
+      tmp.append(arbitraryObject);
+      tmp.append("}");
+      return tmp.toString();
+   }
+   // Package protected ---------------------------------------------
+   
+   // Protected -----------------------------------------------------
+   
+   // Private -------------------------------------------------------
+   
+   // Inner classes -------------------------------------------------
+
+   private static ArrayList cloneList(List toClone)
+   {
+      if (toClone instanceof ArrayList)
+      {
+      	 synchronized (toClone)
+      	 {
+         	return (ArrayList) ((ArrayList) toClone).clone();
+         }
+      }
+      
+      ArrayList clone = new ArrayList(toClone.size());
+      synchronized (toClone)
+      {
+      	clone.addAll(toClone);
+      }
+      return clone;      
+   }
+}

Deleted: projects/cluster/ha-client/tags/1.0.0.GA/src/main/java/org/jboss/ha/framework/interfaces/GenericClusteringException.java
===================================================================
--- projects/cluster/ha-client/trunk/src/main/java/org/jboss/ha/framework/interfaces/GenericClusteringException.java	2008-01-28 20:53:59 UTC (rev 69398)
+++ projects/cluster/ha-client/tags/1.0.0.GA/src/main/java/org/jboss/ha/framework/interfaces/GenericClusteringException.java	2008-01-29 03:21:15 UTC (rev 69414)
@@ -1,154 +0,0 @@
-/*
-  * JBoss, Home of Professional Open Source
-  * Copyright 2005, JBoss Inc., and individual contributors as indicated
-  * by the @authors tag. See the copyright.txt in the distribution for a
-  * full listing of individual contributors.
-  *
-  * This is free software; you can redistribute it and/or modify it
-  * under the terms of the GNU Lesser General Public License as
-  * published by the Free Software Foundation; either version 2.1 of
-  * the License, or (at your option) any later version.
-  *
-  * This software is distributed in the hope that it will be useful,
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of
-  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-  * Lesser General Public License for more details.
-  *
-  * You should have received a copy of the GNU Lesser General Public
-  * License along with this software; if not, write to the Free
-  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-  */
-package org.jboss.ha.framework.interfaces;
-
-import org.jboss.util.NestedException;
-
-/**
- * Generic clustering exception that can be used to replace other exceptions
- * that occur on the server. Thus, only this class is needed on the client side
- * and some specific server side exceptions class are not needed on the client side
- * (such as JMX exceptions for example). 
- * Furthermore, it has support for "COMPLETED" status flag a la IIOP.
- * <p>
- * When an invocation reaches a node, it may be invoked on the actual
- * target or not (or not completely). If {@link #COMPLETED_NO} and working in 
- * a clustered environment, the client proxy is allowed to invoke
- * the same invocation on a different node. Otherwise, it will depend
- * if the target method is idempotent: this is no more the problem of
- * this class but rather the meta-data of the business environment
- * that can give this information
- * </p>
- *
- * @author  <a href="mailto:sacha.labourey at cogito-info.ch">Sacha Labourey</a>.
- * @version $Revision$
- *
- * <p><b>Revisions:</b>
- *
- * <p><b>8 avril 2002 Sacha Labourey:</b>
- * <ul>
- * <li> First implementation </li>
- * </ul>
- */
-
-public class GenericClusteringException
-   extends NestedException
-{
-   // BES - 2007/11/12: This wasn't set in 4.x.  If this causes a problem in a 
-   // compatibility test, just switch it to the old value; I didn't change
-   // the serialized form of the class at all.   
-   /** The serialVersionUID */
-   private static final long serialVersionUID = 3030093807459327632L;
-   
-   /** Means the invocation that generated this exception was invoked on the server-side target */
-   public final static int COMPLETED_YES = 0;
-   /** Means the invocation that generated this exception was *not* invoked on the server-side target */
-   public final static int COMPLETED_NO = 1;
-   /** 
-    * Means it is unclear whether the invocation that generated this exception 
-    * was invoked on the server-side target 
-    */
-   public final static int COMPLETED_MAYBE = 2;
-   
-   public boolean isDefinitive = true;
-   
-   // if yes, then the invocation may be retried against another node
-   // because the state has not been modified by the current invocation
-   //
-   public int completed;
-   
-   public GenericClusteringException ()
-   {
-      this.completed = COMPLETED_MAYBE;
-   }
-   
-   public GenericClusteringException (int CompletionStatus)
-   {
-      this.completed = CompletionStatus;
-   }
-
-   public GenericClusteringException (int CompletionStatus, String s)
-   {
-      super(s);
-      this.completed = CompletionStatus;
-   }
-
-   public GenericClusteringException (int CompletionStatus, String s, boolean isDefinitive)
-   {
-      super(s);
-      this.completed = CompletionStatus;
-      this.isDefinitive = isDefinitive;
-   }
-
-   public GenericClusteringException (int CompletionStatus, Throwable nested, boolean isDefinitive)
-   {
-      super(nested);
-      this.completed = CompletionStatus;
-      this.isDefinitive = isDefinitive;
-   }
-   
-   public GenericClusteringException (int CompletionStatus, Throwable nested)
-   {
-      super(nested);
-      this.completed = CompletionStatus;
-   }
-   
-   /** 
-    * Gets whether the invocation that generated this exception was completely
-    * invoked on the server side target.
-    * <p>
-    * When an invocation reaches a node, it may be invoked on the actual
-    * target or not (or not completely). If COMPLETED_NO and working in 
-    * a clustered environment, the client proxy is allowed to invoke
-    * the same invocation on a different node. Otherwise, it will depend
-    * if the target method is idempotent: this is not the problem of
-    * this class but rather the meta-data of the business environment
-    * that can give this information
-    * </p>
-    * 
-    * @return {@link #COMPLETED_YES}, {@link #COMPLETED_NO} or 
-    *         {@link #COMPLETED_MAYBE}.
-    */
-   public int getCompletionStatus ()
-   {
-      return this.completed;
-   }
-   
-   public void setCompletionStatus (int completionStatus)
-   {
-      this.completed = completionStatus;
-   }
-   
-   /**
-    * Indicates if the exception will most probably be repetitive (definitive) 
-    * or if it is just a temporary failure and new attempts should be tried.
-    */
-   public boolean isDefinitive ()
-   {
-      return this.isDefinitive;      
-   }
-   
-   public void setIsDefinitive (boolean definitive)
-   {
-      this.isDefinitive = definitive;
-   }
-}

Copied: projects/cluster/ha-client/tags/1.0.0.GA/src/main/java/org/jboss/ha/framework/interfaces/GenericClusteringException.java (from rev 69400, projects/cluster/ha-client/trunk/src/main/java/org/jboss/ha/framework/interfaces/GenericClusteringException.java)
===================================================================
--- projects/cluster/ha-client/tags/1.0.0.GA/src/main/java/org/jboss/ha/framework/interfaces/GenericClusteringException.java	                        (rev 0)
+++ projects/cluster/ha-client/tags/1.0.0.GA/src/main/java/org/jboss/ha/framework/interfaces/GenericClusteringException.java	2008-01-29 03:21:15 UTC (rev 69414)
@@ -0,0 +1,154 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+package org.jboss.ha.framework.interfaces;
+
+import org.jboss.util.NestedException;
+
+/**
+ * Generic clustering exception that can be used to replace other exceptions
+ * that occur on the server. Thus, only this class is needed on the client side
+ * and some specific server side exceptions classes are not needed on the client side
+ * (such as JMX exceptions for example). 
+ * Furthermore, it has support for "COMPLETED" status flag a la IIOP.
+ * <p>
+ * When an invocation reaches a node, it may be invoked on the actual
+ * target or not (or not completely). If {@link #COMPLETED_NO} and working in 
+ * a clustered environment, the client proxy is allowed to invoke
+ * the same invocation on a different node. Otherwise, it will depend
+ * if the target method is idempotent: this is no more the problem of
+ * this class but rather the meta-data of the business environment
+ * that can give this information
+ * </p>
+ *
+ * @author  <a href="mailto:sacha.labourey at cogito-info.ch">Sacha Labourey</a>.
+ * @version $Revision$
+ *
+ * <p><b>Revisions:</b>
+ *
+ * <p><b>8 avril 2002 Sacha Labourey:</b>
+ * <ul>
+ * <li> First implementation </li>
+ * </ul>
+ */
+
+public class GenericClusteringException
+   extends NestedException
+{
+   // BES - 2007/11/12: This wasn't set in 4.x.  If this causes a problem in a 
+   // compatibility test, just switch it to the old value; I didn't change
+   // the serialized form of the class at all.   
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 3030093807459327632L;
+   
+   /** Means the invocation that generated this exception was invoked on the server-side target */
+   public final static int COMPLETED_YES = 0;
+   /** Means the invocation that generated this exception was *not* invoked on the server-side target */
+   public final static int COMPLETED_NO = 1;
+   /** 
+    * Means it is unclear whether the invocation that generated this exception 
+    * was invoked on the server-side target 
+    */
+   public final static int COMPLETED_MAYBE = 2;
+   
+   public boolean isDefinitive = true;
+   
+   // if yes, then the invocation may be retried against another node
+   // because the state has not been modified by the current invocation
+   //
+   public int completed;
+   
+   public GenericClusteringException ()
+   {
+      this.completed = COMPLETED_MAYBE;
+   }
+   
+   public GenericClusteringException (int CompletionStatus)
+   {
+      this.completed = CompletionStatus;
+   }
+
+   public GenericClusteringException (int CompletionStatus, String s)
+   {
+      super(s);
+      this.completed = CompletionStatus;
+   }
+
+   public GenericClusteringException (int CompletionStatus, String s, boolean isDefinitive)
+   {
+      super(s);
+      this.completed = CompletionStatus;
+      this.isDefinitive = isDefinitive;
+   }
+
+   public GenericClusteringException (int CompletionStatus, Throwable nested, boolean isDefinitive)
+   {
+      super(nested);
+      this.completed = CompletionStatus;
+      this.isDefinitive = isDefinitive;
+   }
+   
+   public GenericClusteringException (int CompletionStatus, Throwable nested)
+   {
+      super(nested);
+      this.completed = CompletionStatus;
+   }
+   
+   /** 
+    * Gets whether the invocation that generated this exception was completely
+    * invoked on the server side target.
+    * <p>
+    * When an invocation reaches a node, it may be invoked on the actual
+    * target or not (or not completely). If COMPLETED_NO and working in 
+    * a clustered environment, the client proxy is allowed to invoke
+    * the same invocation on a different node. Otherwise, it will depend
+    * if the target method is idempotent: this is not the problem of
+    * this class but rather the meta-data of the business environment
+    * that can give this information
+    * </p>
+    * 
+    * @return {@link #COMPLETED_YES}, {@link #COMPLETED_NO} or 
+    *         {@link #COMPLETED_MAYBE}.
+    */
+   public int getCompletionStatus ()
+   {
+      return this.completed;
+   }
+   
+   public void setCompletionStatus (int completionStatus)
+   {
+      this.completed = completionStatus;
+   }
+   
+   /**
+    * Indicates if the exception will most probably be repetitive (definitive) 
+    * or if it is just a temporary failure and new attempts should be tried.
+    */
+   public boolean isDefinitive ()
+   {
+      return this.isDefinitive;      
+   }
+   
+   public void setIsDefinitive (boolean definitive)
+   {
+      this.isDefinitive = definitive;
+   }
+}




More information about the jboss-cvs-commits mailing list