[jboss-cvs] JBossAS SVN: r71957 - in projects/cluster/ha-server-api/trunk: src/main/java/org/jboss and 2 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Apr 10 12:38:35 EDT 2008


Author: bstansberry at jboss.com
Date: 2008-04-10 12:38:35 -0400 (Thu, 10 Apr 2008)
New Revision: 71957

Added:
   projects/cluster/ha-server-api/trunk/src/main/java/org/jboss/aspects/
   projects/cluster/ha-server-api/trunk/src/main/java/org/jboss/aspects/remoting/
   projects/cluster/ha-server-api/trunk/src/main/java/org/jboss/aspects/remoting/ReplicantsManagerInterceptor.java
Modified:
   projects/cluster/ha-server-api/trunk/.classpath
   projects/cluster/ha-server-api/trunk/pom.xml
Log:
[JBCLUSTER-191] Move AS aspects module cluster client classes to jboss-ha-server-api

Modified: projects/cluster/ha-server-api/trunk/.classpath
===================================================================
--- projects/cluster/ha-server-api/trunk/.classpath	2008-04-10 16:37:53 UTC (rev 71956)
+++ projects/cluster/ha-server-api/trunk/.classpath	2008-04-10 16:38:35 UTC (rev 71957)
@@ -2,11 +2,25 @@
   <classpathentry kind="src" path="src/main/java"/>
   <classpathentry kind="output" path="target/classes"/>
   <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-  <classpathentry kind="var" path="M2_REPO/jboss/jboss-logging-spi/2.0.3.GA/jboss-logging-spi-2.0.3.GA.jar"/>
+  <classpathentry kind="var" path="M2_REPO/jboss/jboss-common-logging-spi/2.0.4.GA/jboss-common-logging-spi-2.0.4.GA.jar" sourcepath="M2_REPO/jboss/jboss-common-logging-spi/2.0.4.GA/jboss-common-logging-spi-2.0.4.GA-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-common-core/2.2.2.GA/jboss-common-core-2.2.2.GA.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/cluster/jboss-ha-client/1.1.0-SNAPSHOT/jboss-ha-client-1.1.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/jboss/cluster/jboss-ha-client/1.1.0-SNAPSHOT/jboss-ha-client-1.1.0-SNAPSHOT-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/aop/jboss-aop/2.0.0.CR3/jboss-aop-2.0.0.CR3.jar"/>
+  <classpathentry kind="var" path="M2_REPO/ant/ant/1.6.5/ant-1.6.5.jar"/>
   <classpathentry kind="var" path="M2_REPO/apache-xerces/xml-apis/2.7.1/xml-apis-2.7.1.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/javassist/3.6.0.GA/javassist-3.6.0.GA.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-container/2.0.0.Beta6/jboss-container-2.0.0.Beta6.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/jbossxb/2.0.0.CR4/jbossxb-2.0.0.CR4.jar"/>
+  <classpathentry kind="var" path="M2_REPO/apache-xerces/xercesImpl/2.7.1/xercesImpl-2.7.1.jar"/>
+  <classpathentry kind="var" path="M2_REPO/wutka-dtdparser/dtdparser121/1.2.1/dtdparser121-1.2.1.jar"/>
+  <classpathentry kind="var" path="M2_REPO/javax/activation/activation/1.0.2/activation-1.0.2.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-common-core/2.2.3.GA/jboss-common-core-2.2.3.GA.jar"/>
   <classpathentry kind="var" path="M2_REPO/apache-httpclient/commons-httpclient/2.0.2/commons-httpclient-2.0.2.jar"/>
   <classpathentry kind="var" path="M2_REPO/apache-slide/webdavlib/2.0/webdavlib-2.0.jar"/>
-  <classpathentry kind="var" path="M2_REPO/jboss/jboss-common-logging-spi/2.0.4.GA/jboss-common-logging-spi-2.0.4.GA.jar"/>
+  <classpathentry kind="var" path="M2_REPO/jboss/jboss-logging-spi/2.0.3.GA/jboss-logging-spi-2.0.3.GA.jar"/>
+  <classpathentry kind="var" path="M2_REPO/qdox/qdox/1.6/qdox-1.6.jar"/>
+  <classpathentry kind="var" path="M2_REPO/trove/trove/2.1.1/trove-2.1.1.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/aspects/jboss-remoting-aspects/0.1-SNAPSHOT/jboss-remoting-aspects-0.1-SNAPSHOT.jar" sourcepath="M2_REPO/org/jboss/aspects/jboss-remoting-aspects/0.1-SNAPSHOT/jboss-remoting-aspects-0.1-SNAPSHOT-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA.jar"/>
+  <classpathentry kind="var" path="M2_REPO/jboss/remoting/jboss-remoting/2.4.0.CR1/jboss-remoting-2.4.0.CR1.jar"/>
 </classpath>
\ No newline at end of file

Modified: projects/cluster/ha-server-api/trunk/pom.xml
===================================================================
--- projects/cluster/ha-server-api/trunk/pom.xml	2008-04-10 16:37:53 UTC (rev 71956)
+++ projects/cluster/ha-server-api/trunk/pom.xml	2008-04-10 16:38:35 UTC (rev 71957)
@@ -8,8 +8,8 @@
   <groupId>org.jboss.cluster</groupId>
   <artifactId>jboss-ha-server-api</artifactId>
   <packaging>jar</packaging>
-  <version>1.0.1-SNAPSHOT</version>
-  <name>JBoss Cluster HA Client Classes</name>
+  <version>1.1.0-SNAPSHOT</version>
+  <name>JBoss Cluster HA Server API Classes</name>
   <url>http://www.jboss.org</url>
   <description>A set of server-side API classes for users of the JBoss AS clustering framework</description>
   <licenses>
@@ -42,12 +42,19 @@
   
   <!-- Do not add version information here, use ../build/pom.xml instead -->
   <dependencies> 
+    
     <!-- Global dependencies -->
     <dependency>
       <groupId>jboss</groupId>
       <artifactId>jboss-common-logging-spi</artifactId>
       <version>${version.jboss.logging.spi}</version>
     </dependency>
+    <dependency>
+      <groupId>org.jboss.cluster</groupId>
+      <artifactId>jboss-ha-client</artifactId>
+      <version>1.1.0-SNAPSHOT</version>
+    </dependency>
+    
     <!-- Test dependencies -->
     <dependency>
       <groupId>junit</groupId>

Added: projects/cluster/ha-server-api/trunk/src/main/java/org/jboss/aspects/remoting/ReplicantsManagerInterceptor.java
===================================================================
--- projects/cluster/ha-server-api/trunk/src/main/java/org/jboss/aspects/remoting/ReplicantsManagerInterceptor.java	                        (rev 0)
+++ projects/cluster/ha-server-api/trunk/src/main/java/org/jboss/aspects/remoting/ReplicantsManagerInterceptor.java	2008-04-10 16:38:35 UTC (rev 71957)
@@ -0,0 +1,73 @@
+/*
+  * 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.aspects.remoting;
+
+import org.jboss.ha.framework.server.HATarget;
+
+import java.util.ArrayList;
+import java.util.Map;
+
+/**
+ * Checks to see if this object is local in VM
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 37406 $
+ */
+public class ReplicantsManagerInterceptor implements org.jboss.aop.advice.Interceptor, ClusterConstants
+{
+   private final Map families;
+
+   public ReplicantsManagerInterceptor(Map families)
+   {
+      this.families = families;
+   }
+
+   public String getName()
+   {
+      return this.getClass().getName();
+   }
+
+   public Object invoke(org.jboss.aop.joinpoint.Invocation invocation) throws Throwable
+   {
+      Object response = invocation.invokeNext();
+      String clientFamily = (String) invocation.getMetaData(CLUSTERED_REMOTING, CLUSTER_FAMILY);
+
+      HATarget target = (HATarget) families.get(clientFamily);
+      if (target == null)
+      {
+         return response;
+      }
+
+      Long clientViewId = (Long) invocation.getMetaData(CLUSTERED_REMOTING, CLUSTER_VIEW_ID);
+      if (clientViewId == null)
+      {
+         // Maybe we're being invoked upon by a non-clustered proxy
+         return response;
+      }
+      if (clientViewId.longValue() != target.getCurrentViewId())
+      {
+         invocation.addResponseAttachment("replicants", new ArrayList(target.getReplicants()));
+         invocation.addResponseAttachment("viewId", new Long(target.getCurrentViewId()));
+      }
+      return response;
+   }
+}




More information about the jboss-cvs-commits mailing list