[jboss-cvs] JBossAS SVN: r106934 - in projects/ejb3/tags: jboss-ejb3-proxy-clustered-1.0.4 and 2 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Jul 20 13:29:42 EDT 2010


Author: ALRubinger
Date: 2010-07-20 13:29:41 -0400 (Tue, 20 Jul 2010)
New Revision: 106934

Added:
   projects/ejb3/tags/jboss-ejb3-proxy-clustered-1.0.4/
   projects/ejb3/tags/jboss-ejb3-proxy-clustered-1.0.4/pom.xml
   projects/ejb3/tags/jboss-ejb3-proxy-clustered-1.0.4/src/main/java/org/jboss/ejb3/proxy/clustered/factory/session/stateful/StatefulSessionClusteredProxyFactory.java
   projects/ejb3/tags/jboss-ejb3-proxy-clustered-1.0.4/src/main/java/org/jboss/ejb3/proxy/clustered/factory/session/stateless/StatelessSessionClusteredProxyFactory.java
Removed:
   projects/ejb3/tags/jboss-ejb3-proxy-clustered-1.0.4/pom.xml
   projects/ejb3/tags/jboss-ejb3-proxy-clustered-1.0.4/src/main/java/org/jboss/ejb3/proxy/clustered/factory/session/stateful/StatefulSessionClusteredProxyFactory.java
   projects/ejb3/tags/jboss-ejb3-proxy-clustered-1.0.4/src/main/java/org/jboss/ejb3/proxy/clustered/factory/session/stateless/StatelessSessionClusteredProxyFactory.java
Log:
[maven-release-plugin]  copy for tag jboss-ejb3-proxy-clustered-1.0.4

Copied: projects/ejb3/tags/jboss-ejb3-proxy-clustered-1.0.4 (from rev 106819, projects/ejb3/trunk/proxy-clustered)

Deleted: projects/ejb3/tags/jboss-ejb3-proxy-clustered-1.0.4/pom.xml
===================================================================
--- projects/ejb3/trunk/proxy-clustered/pom.xml	2010-07-19 15:01:49 UTC (rev 106819)
+++ projects/ejb3/tags/jboss-ejb3-proxy-clustered-1.0.4/pom.xml	2010-07-20 17:29:41 UTC (rev 106934)
@@ -1,164 +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 -->
-  <parent>
-    <groupId>org.jboss.ejb3</groupId>
-    <artifactId>jboss-ejb3-build</artifactId>
-    <version>1.0.3</version>
-  </parent>
-
-  <!-- Model Version -->
-  <modelVersion>4.0.0</modelVersion>
-
-  <!-- Artifact Configuration -->
-  <groupId>org.jboss.ejb3</groupId>
-  <artifactId>jboss-ejb3-proxy-clustered</artifactId>
-  <version>1.0.4-SNAPSHOT</version>
-  <name>JBoss EJB 3.0 Clustered Proxy</name>
-  <description>JBoss EJB3 Clustered Proxy Component</description>
-  <url>http://www.jboss.org/jbossejb3</url>
-
-  <!-- Build Configuration -->
-  <build>
-
-    <plugins>
-
-      <!-- Build a CP File for use by MockServer -->     
-      <plugin>
-        <artifactId>maven-dependency-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>build-cp-file</id>
-            <phase>validate</phase>
-            <goals>
-              <goal>build-classpath</goal>
-            </goals>
-            <configuration>
-              <outputFile>target/cp.txt</outputFile>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-
-      <!-- Assembly Plugin (Proxy Client) -->
-      <plugin>
-        <artifactId>maven-assembly-plugin</artifactId>
-        <version>2.2-beta-1</version>
-        <executions>
-          <execution>
-            <id>make-assembly</id>
-            <phase>package</phase>
-            <goals>
-              <goal>attached</goal>
-            </goals>
-          </execution>
-        </executions>
-        <configuration>
-          <descriptors>
-            <descriptor>jboss-ejb3-proxy-clustered-client.xml</descriptor>
-          </descriptors>
-          <attach>true</attach>
-        </configuration>
-        <inherited>false</inherited>
-      </plugin>
-
-    </plugins>
-
-  </build>
-
-  <dependencyManagement>
-    <dependencies>
-      <!-- Because of a bug in m2eclipse the version of reflect must be explicitly defined 
-      <dependency>
-        <groupId>org.jboss</groupId>
-        <artifactId>jboss-reflect</artifactId>
-        <version>2.0.0.Beta12</version>
-      </dependency> -->
-    </dependencies>
-  </dependencyManagement>
-  
-  <!-- Dependencies -->
-  <dependencies>
-
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-
-    <!-- We pull in most things via the proxy component we are extending -->
-    <dependency>
-      <groupId>org.jboss.ejb3</groupId>
-      <artifactId>jboss-ejb3-proxy-impl</artifactId>
-      <version>1.0.6</version>
-    </dependency>
-    
-    <dependency>
-      <groupId>org.jboss.ejb3</groupId>
-      <artifactId>jboss-ejb3-proxy-spi</artifactId>
-      <version>1.0.0</version>
-    </dependency>
-    
-    <dependency>
-        <groupId>org.jboss.naming</groupId>
-        <artifactId>jnpserver</artifactId>
-        <version>5.0.0.CR1</version>
-        <scope>compile</scope>
-        <exclusions>
-            <exclusion>
-              <groupId>org.jboss</groupId>
-              <artifactId>jboss-common-core</artifactId>            
-            </exclusion>
-        </exclusions>
-    </dependency>
-    
-    <dependency>
-      <groupId>org.jboss.cluster</groupId>
-      <artifactId>jboss-ha-client</artifactId>
-      <version>1.1.1.GA</version>
-      <exclusions>
-        <exclusion>
-          <groupId>org.jboss.aspects</groupId>
-          <artifactId>jboss-remoting-aspects</artifactId>            
-        </exclusion>
-        <exclusion>
-          <groupId>jboss.remoting</groupId>
-          <artifactId>jboss-remoting</artifactId>            
-        </exclusion>
-        <exclusion>
-          <groupId>org.jboss.aop</groupId>
-          <artifactId>jboss-aop</artifactId>            
-        </exclusion>
-      </exclusions>
-    </dependency>
-    
-    <dependency>
-      <groupId>org.jboss.cluster</groupId>
-      <artifactId>jboss-ha-server-api</artifactId>
-      <version>1.1.1.GA</version>
-      <exclusions>
-        <exclusion>
-          <groupId>org.jboss</groupId>
-          <artifactId>jboss-common-core</artifactId>            
-        </exclusion>
-        <exclusion>
-          <groupId>org.jboss.logging</groupId>
-          <artifactId>jboss-logging-spi</artifactId>            
-        </exclusion>
-        <exclusion>
-          <groupId>org.jboss.cache</groupId>
-          <artifactId>jbosscache-core</artifactId>            
-        </exclusion>
-        <exclusion>
-          <groupId>org.jboss.cache</groupId>
-          <artifactId>jbosscache-pojo</artifactId>            
-        </exclusion>
-        <exclusion>
-          <groupId>jgroups</groupId>
-          <artifactId>jgroups</artifactId>            
-        </exclusion>
-      </exclusions>
-    </dependency> 
-
-  </dependencies>
-</project>

Copied: projects/ejb3/tags/jboss-ejb3-proxy-clustered-1.0.4/pom.xml (from rev 106933, projects/ejb3/trunk/proxy-clustered/pom.xml)
===================================================================
--- projects/ejb3/tags/jboss-ejb3-proxy-clustered-1.0.4/pom.xml	                        (rev 0)
+++ projects/ejb3/tags/jboss-ejb3-proxy-clustered-1.0.4/pom.xml	2010-07-20 17:29:41 UTC (rev 106934)
@@ -0,0 +1,170 @@
+<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 -->
+  <parent>
+    <groupId>org.jboss.ejb3</groupId>
+    <artifactId>jboss-ejb3-build</artifactId>
+    <version>1.0.3</version>
+  </parent>
+
+  <!-- Model Version -->
+  <modelVersion>4.0.0</modelVersion>
+
+  <!-- Artifact Configuration -->
+  <groupId>org.jboss.ejb3</groupId>
+  <artifactId>jboss-ejb3-proxy-clustered</artifactId>
+  <version>1.0.4</version>
+  <name>JBoss EJB 3.0 Clustered Proxy</name>
+  <description>JBoss EJB3 Clustered Proxy Component</description>
+  <url>http://www.jboss.org/jbossejb3</url>
+
+  <!-- Build Configuration -->
+  <build>
+
+    <plugins>
+
+      <!-- Build a CP File for use by MockServer -->     
+      <plugin>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>build-cp-file</id>
+            <phase>validate</phase>
+            <goals>
+              <goal>build-classpath</goal>
+            </goals>
+            <configuration>
+              <outputFile>target/cp.txt</outputFile>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+
+      <!-- Assembly Plugin (Proxy Client) -->
+      <plugin>
+        <artifactId>maven-assembly-plugin</artifactId>
+        <version>2.2-beta-1</version>
+        <executions>
+          <execution>
+            <id>make-assembly</id>
+            <phase>package</phase>
+            <goals>
+              <goal>attached</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <descriptors>
+            <descriptor>jboss-ejb3-proxy-clustered-client.xml</descriptor>
+          </descriptors>
+          <attach>true</attach>
+        </configuration>
+        <inherited>false</inherited>
+      </plugin>
+
+    </plugins>
+
+  </build>
+
+  <dependencyManagement>
+    <dependencies>
+      <!-- Because of a bug in m2eclipse the version of reflect must be explicitly defined 
+      <dependency>
+        <groupId>org.jboss</groupId>
+        <artifactId>jboss-reflect</artifactId>
+        <version>2.0.0.Beta12</version>
+      </dependency> -->
+    </dependencies>
+  </dependencyManagement>
+  
+  <!-- Dependencies -->
+  <dependencies>
+
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+    <!-- We pull in most things via the proxy component we are extending -->
+    <dependency>
+      <groupId>org.jboss.ejb3</groupId>
+      <artifactId>jboss-ejb3-proxy-impl</artifactId>
+      <version>1.0.10</version>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.jboss.ejb3</groupId>
+      <artifactId>jboss-ejb3-proxy-spi</artifactId>
+      <version>1.0.0</version>
+    </dependency>
+    
+    <dependency>
+        <groupId>org.jboss.naming</groupId>
+        <artifactId>jnpserver</artifactId>
+        <version>5.0.0.CR1</version>
+        <scope>compile</scope>
+        <exclusions>
+            <exclusion>
+              <groupId>org.jboss</groupId>
+              <artifactId>jboss-common-core</artifactId>            
+            </exclusion>
+        </exclusions>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.jboss.cluster</groupId>
+      <artifactId>jboss-ha-client</artifactId>
+      <version>1.1.1.GA</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.jboss.aspects</groupId>
+          <artifactId>jboss-remoting-aspects</artifactId>            
+        </exclusion>
+        <exclusion>
+          <groupId>jboss.remoting</groupId>
+          <artifactId>jboss-remoting</artifactId>            
+        </exclusion>
+        <exclusion>
+          <groupId>org.jboss.aop</groupId>
+          <artifactId>jboss-aop</artifactId>            
+        </exclusion>
+      </exclusions>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.jboss.cluster</groupId>
+      <artifactId>jboss-ha-server-api</artifactId>
+      <version>1.1.1.GA</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.jboss</groupId>
+          <artifactId>jboss-common-core</artifactId>            
+        </exclusion>
+        <exclusion>
+          <groupId>org.jboss.logging</groupId>
+          <artifactId>jboss-logging-spi</artifactId>            
+        </exclusion>
+        <exclusion>
+          <groupId>org.jboss.cache</groupId>
+          <artifactId>jbosscache-core</artifactId>            
+        </exclusion>
+        <exclusion>
+          <groupId>org.jboss.cache</groupId>
+          <artifactId>jbosscache-pojo</artifactId>            
+        </exclusion>
+        <exclusion>
+          <groupId>jgroups</groupId>
+          <artifactId>jgroups</artifactId>            
+        </exclusion>
+      </exclusions>
+    </dependency> 
+
+  </dependencies>
+
+  <scm>
+    <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/ejb3/tags/jboss-ejb3-proxy-clustered-1.0.4</connection>
+    <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/ejb3/tags/jboss-ejb3-proxy-clustered-1.0.4</developerConnection>
+    <url>http://anonsvn.jboss.org/repos/jbossas/projects/ejb3/tags/jboss-ejb3-proxy-clustered-1.0.4</url>
+  </scm>
+</project>

Deleted: projects/ejb3/tags/jboss-ejb3-proxy-clustered-1.0.4/src/main/java/org/jboss/ejb3/proxy/clustered/factory/session/stateful/StatefulSessionClusteredProxyFactory.java
===================================================================
--- projects/ejb3/trunk/proxy-clustered/src/main/java/org/jboss/ejb3/proxy/clustered/factory/session/stateful/StatefulSessionClusteredProxyFactory.java	2010-07-19 15:01:49 UTC (rev 106819)
+++ projects/ejb3/tags/jboss-ejb3-proxy-clustered-1.0.4/src/main/java/org/jboss/ejb3/proxy/clustered/factory/session/stateful/StatefulSessionClusteredProxyFactory.java	2010-07-20 17:29:41 UTC (rev 106934)
@@ -1,197 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.ejb3.proxy.clustered.factory.session.stateful;
-
-import org.jboss.aop.Advisor;
-import org.jboss.aop.Dispatcher;
-import org.jboss.aop.advice.Interceptor;
-import org.jboss.ejb3.proxy.clustered.factory.session.stateless.StatelessSessionClusteredProxyFactory;
-import org.jboss.ejb3.proxy.clustered.handler.session.stateful.StatefulClusteredProxyInvocationHandler;
-import org.jboss.ejb3.proxy.clustered.registry.ProxyClusteringInfo;
-import org.jboss.ejb3.proxy.clustered.registry.ProxyClusteringRegistry;
-import org.jboss.ejb3.proxy.impl.factory.session.stateful.StatefulSessionRemoteProxyFactory;
-import org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandler;
-import org.jboss.ha.client.loadbalance.LoadBalancePolicy;
-import org.jboss.logging.Logger;
-import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
-import org.jboss.remoting.InvokerLocator;
-
-/**
- * A SFSB Proxy Factory for Clustered Remote Views
- *
- * @author Brian Stansberry
- * 
- * @version $Revision: $
- */
-public class StatefulSessionClusteredProxyFactory extends StatefulSessionRemoteProxyFactory
-{
-   // --------------------------------------------------------------------------------||
-   // Class Members ------------------------------------------------------------------||
-   // --------------------------------------------------------------------------------||
-
-   private static final String STACK_NAME_CLUSTERED_STATEFUL_SESSION_CLIENT_INTERCEPTORS = "ClusteredStatefulSessionClientInterceptors";
-
-   private static final Logger log = Logger.getLogger(StatelessSessionClusteredProxyFactory.class);
-   
-   // --------------------------------------------------------------------------------||
-   // Instance Members ---------------------------------------------------------------||
-   // --------------------------------------------------------------------------------||
-
-   private final ProxyClusteringRegistry registry;
-   private ProxyClusteringInfo beanClusteringInfo;
-   
-   // --------------------------------------------------------------------------------||
-   // Constructor --------------------------------------------------------------------||
-   // --------------------------------------------------------------------------------||
-
-   /**
-    * Constructor
-    * 
-    * @param name The unique name for this ProxyFactory
-    * @param containerName The name of the InvokableContext (container)
-    *   upon which Proxies will invoke
-    * @param containerGuid The globally-unique name of the container
-    * @param metadata The metadata representing this SFSB
-    * @param classloader The ClassLoader associated with the StatelessContainer
-    *       for which this ProxyFactory is to generate Proxies
-    * @param url The URL to use for remoting
-    * @param advisor The Advisor for proxies created by this factory
-    * @param interceptorStack
-    */
-   public StatefulSessionClusteredProxyFactory(final String name, final String containerName,
-         final String containerGuid, final JBossSessionBeanMetaData metadata, final ClassLoader classloader,
-         final String url, final Advisor advisor, ProxyClusteringRegistry registry, final String interceptorStack)
-   {
-      // Call Super
-      super(name, containerName, containerGuid, metadata, classloader, url, advisor, interceptorStack);
-
-      assert registry != null : "registry is null";
-
-      this.registry = registry;
-   }
-
-   // --------------------------------------------------------------------------------||
-   // Functional Methods -------------------------------------------------------------||
-   // --------------------------------------------------------------------------------||
-
-   /**
-    * Return the name of the interceptor stack to apply to 
-    * proxies created by this proxy factory
-    * 
-    * @return
-    */
-   @Override
-   protected String getInterceptorStackName()
-   {
-      return STACK_NAME_CLUSTERED_STATEFUL_SESSION_CLIENT_INTERCEPTORS;
-   }
-
-   // --------------------------------------------------------------------------------||
-   // Required Implementations -------------------------------------------------------||
-   // --------------------------------------------------------------------------------||
-
-   @Override
-   public void start() throws Exception
-   {
-      super.start();
-      
-      this.beanClusteringInfo = this.registry.registerClusteredBean(getContainerName(), getName(), getMetadata(), new InvokerLocator(getUrl()));
-      
-      // FIXME move to superclass
-      // Register with Remoting
-      log.debug("Registering with Remoting Dispatcher under name \"" + getName() + "\": " + this);
-      Dispatcher.singleton.registerTarget(getName(), this);
-   }
-
-   @Override
-   public void stop() throws Exception
-   {
-      this.registry.unregisterClusteredBean(this.beanClusteringInfo);
-      
-      // FIXME move to superclass
-      // Register with Remoting
-      log.debug("Unregistering name \"" + getName() + "\" from Remoting Dispatcher");
-      Dispatcher.singleton.unregisterTarget(getName());      
-      
-      super.stop();
-   }
-   
-   
-   @Override
-   protected SessionProxyInvocationHandler createBusinessDefaultInvocationHandler()
-   {
-      return createInvocationHandler(null, false);
-   }
-
-   @Override
-   protected SessionProxyInvocationHandler createBusinessInterfaceSpecificInvocationHandler(String businessInterfaceName)
-   {
-      return createInvocationHandler(businessInterfaceName, false);
-   }
-
-   @Override
-   protected SessionProxyInvocationHandler createEjb2xComponentInterfaceInvocationHandler()
-   {
-      return createInvocationHandler(null, false);
-   }
-
-   @Override
-   protected SessionProxyInvocationHandler createHomeInvocationHandler()
-   {
-      return createInvocationHandler(null, true);
-   }
-
-   // --------------------------------------------------------------------------------||
-   // Private ------------------------------------------------------------------------||
-   // --------------------------------------------------------------------------------||
-
-   private SessionProxyInvocationHandler createInvocationHandler(String businessInterfaceName, boolean isOnlyHome)   
-   {
-      // Obtain target properties
-      String containerName = this.getContainerName();
-      String url = this.getUrl();
-      String containerGuid = this.getContainerGuid();
-
-      // Get Interceptors
-      Interceptor[] interceptors = this.getInterceptors();
-
-      Class<? extends LoadBalancePolicy> policyClass = isOnlyHome ? beanClusteringInfo.getHomeLoadBalancePolicy() : beanClusteringInfo.getLoadBalancePolicy();
-      LoadBalancePolicy lbp;
-      try
-      {
-         lbp = policyClass.newInstance();
-      }
-      catch (Exception e)
-      {
-         throw new RuntimeException("Cannot instantiate LoadBalancePolicy class " + policyClass);
-      }
-      
-      // Create
-      SessionProxyInvocationHandler handler = new StatefulClusteredProxyInvocationHandler(containerName, containerGuid,
-            interceptors, businessInterfaceName, url, beanClusteringInfo.getFamilyWrapper(), 
-            lbp, beanClusteringInfo.getPartitionName());
-
-      // Return
-      return handler;
-   }
-   
-}

Copied: projects/ejb3/tags/jboss-ejb3-proxy-clustered-1.0.4/src/main/java/org/jboss/ejb3/proxy/clustered/factory/session/stateful/StatefulSessionClusteredProxyFactory.java (from rev 106931, projects/ejb3/trunk/proxy-clustered/src/main/java/org/jboss/ejb3/proxy/clustered/factory/session/stateful/StatefulSessionClusteredProxyFactory.java)
===================================================================
--- projects/ejb3/tags/jboss-ejb3-proxy-clustered-1.0.4/src/main/java/org/jboss/ejb3/proxy/clustered/factory/session/stateful/StatefulSessionClusteredProxyFactory.java	                        (rev 0)
+++ projects/ejb3/tags/jboss-ejb3-proxy-clustered-1.0.4/src/main/java/org/jboss/ejb3/proxy/clustered/factory/session/stateful/StatefulSessionClusteredProxyFactory.java	2010-07-20 17:29:41 UTC (rev 106934)
@@ -0,0 +1,197 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.proxy.clustered.factory.session.stateful;
+
+import org.jboss.aop.Advisor;
+import org.jboss.aop.Dispatcher;
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.ejb3.proxy.clustered.factory.session.stateless.StatelessSessionClusteredProxyFactory;
+import org.jboss.ejb3.proxy.clustered.handler.session.stateful.StatefulClusteredProxyInvocationHandler;
+import org.jboss.ejb3.proxy.clustered.registry.ProxyClusteringInfo;
+import org.jboss.ejb3.proxy.clustered.registry.ProxyClusteringRegistry;
+import org.jboss.ejb3.proxy.impl.factory.session.stateful.StatefulSessionRemoteProxyFactory;
+import org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandler;
+import org.jboss.ha.client.loadbalance.LoadBalancePolicy;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
+import org.jboss.remoting.InvokerLocator;
+
+/**
+ * A SFSB Proxy Factory for Clustered Remote Views
+ *
+ * @author Brian Stansberry
+ * 
+ * @version $Revision: $
+ */
+public class StatefulSessionClusteredProxyFactory extends StatefulSessionRemoteProxyFactory
+{
+   // --------------------------------------------------------------------------------||
+   // Class Members ------------------------------------------------------------------||
+   // --------------------------------------------------------------------------------||
+
+   private static final String STACK_NAME_CLUSTERED_STATEFUL_SESSION_CLIENT_INTERCEPTORS = "ClusteredStatefulSessionClientInterceptors";
+
+   private static final Logger log = Logger.getLogger(StatelessSessionClusteredProxyFactory.class);
+   
+   // --------------------------------------------------------------------------------||
+   // Instance Members ---------------------------------------------------------------||
+   // --------------------------------------------------------------------------------||
+
+   private final ProxyClusteringRegistry registry;
+   private ProxyClusteringInfo beanClusteringInfo;
+   
+   // --------------------------------------------------------------------------------||
+   // Constructor --------------------------------------------------------------------||
+   // --------------------------------------------------------------------------------||
+
+   /**
+    * Constructor
+    * 
+    * @param name The unique name for this ProxyFactory
+    * @param containerName The name of the InvokableContext (container)
+    *   upon which Proxies will invoke
+    * @param containerGuid The globally-unique name of the container
+    * @param metadata The metadata representing this SFSB
+    * @param classloader The ClassLoader associated with the StatelessContainer
+    *       for which this ProxyFactory is to generate Proxies
+    * @param url The URL to use for remoting
+    * @param advisor The Advisor for proxies created by this factory
+    * @param interceptorStack
+    */
+   public StatefulSessionClusteredProxyFactory(final String name, final String containerName,
+         final String containerGuid, final JBossSessionBeanMetaData metadata, final ClassLoader classloader,
+         final String url, final Advisor advisor, ProxyClusteringRegistry registry, final String interceptorStack)
+   {
+      // Call Super
+      super(name, containerName, containerGuid, metadata, classloader, url, advisor, interceptorStack);
+
+      assert registry != null : "registry is null";
+
+      this.registry = registry;
+   }
+
+   // --------------------------------------------------------------------------------||
+   // Functional Methods -------------------------------------------------------------||
+   // --------------------------------------------------------------------------------||
+
+   /**
+    * Return the name of the interceptor stack to apply to 
+    * proxies created by this proxy factory
+    * 
+    * @return
+    */
+   @Override
+   protected String getDefaultInterceptorStackName()
+   {
+      return STACK_NAME_CLUSTERED_STATEFUL_SESSION_CLIENT_INTERCEPTORS;
+   }
+
+   // --------------------------------------------------------------------------------||
+   // Required Implementations -------------------------------------------------------||
+   // --------------------------------------------------------------------------------||
+
+   @Override
+   public void start() throws Exception
+   {
+      super.start();
+      
+      this.beanClusteringInfo = this.registry.registerClusteredBean(getContainerName(), getName(), getMetadata(), new InvokerLocator(getUrl()));
+      
+      // FIXME move to superclass
+      // Register with Remoting
+      log.debug("Registering with Remoting Dispatcher under name \"" + getName() + "\": " + this);
+      Dispatcher.singleton.registerTarget(getName(), this);
+   }
+
+   @Override
+   public void stop() throws Exception
+   {
+      this.registry.unregisterClusteredBean(this.beanClusteringInfo);
+      
+      // FIXME move to superclass
+      // Register with Remoting
+      log.debug("Unregistering name \"" + getName() + "\" from Remoting Dispatcher");
+      Dispatcher.singleton.unregisterTarget(getName());      
+      
+      super.stop();
+   }
+   
+   
+   @Override
+   protected SessionProxyInvocationHandler createBusinessDefaultInvocationHandler()
+   {
+      return createInvocationHandler(null, false);
+   }
+
+   @Override
+   protected SessionProxyInvocationHandler createBusinessInterfaceSpecificInvocationHandler(String businessInterfaceName)
+   {
+      return createInvocationHandler(businessInterfaceName, false);
+   }
+
+   @Override
+   protected SessionProxyInvocationHandler createEjb2xComponentInterfaceInvocationHandler()
+   {
+      return createInvocationHandler(null, false);
+   }
+
+   @Override
+   protected SessionProxyInvocationHandler createHomeInvocationHandler()
+   {
+      return createInvocationHandler(null, true);
+   }
+
+   // --------------------------------------------------------------------------------||
+   // Private ------------------------------------------------------------------------||
+   // --------------------------------------------------------------------------------||
+
+   private SessionProxyInvocationHandler createInvocationHandler(String businessInterfaceName, boolean isOnlyHome)   
+   {
+      // Obtain target properties
+      String containerName = this.getContainerName();
+      String url = this.getUrl();
+      String containerGuid = this.getContainerGuid();
+
+      // Get Interceptors
+      Interceptor[] interceptors = this.getInterceptors();
+
+      Class<? extends LoadBalancePolicy> policyClass = isOnlyHome ? beanClusteringInfo.getHomeLoadBalancePolicy() : beanClusteringInfo.getLoadBalancePolicy();
+      LoadBalancePolicy lbp;
+      try
+      {
+         lbp = policyClass.newInstance();
+      }
+      catch (Exception e)
+      {
+         throw new RuntimeException("Cannot instantiate LoadBalancePolicy class " + policyClass);
+      }
+      
+      // Create
+      SessionProxyInvocationHandler handler = new StatefulClusteredProxyInvocationHandler(containerName, containerGuid,
+            interceptors, businessInterfaceName, url, beanClusteringInfo.getFamilyWrapper(), 
+            lbp, beanClusteringInfo.getPartitionName());
+
+      // Return
+      return handler;
+   }
+   
+}

Deleted: projects/ejb3/tags/jboss-ejb3-proxy-clustered-1.0.4/src/main/java/org/jboss/ejb3/proxy/clustered/factory/session/stateless/StatelessSessionClusteredProxyFactory.java
===================================================================
--- projects/ejb3/trunk/proxy-clustered/src/main/java/org/jboss/ejb3/proxy/clustered/factory/session/stateless/StatelessSessionClusteredProxyFactory.java	2010-07-19 15:01:49 UTC (rev 106819)
+++ projects/ejb3/tags/jboss-ejb3-proxy-clustered-1.0.4/src/main/java/org/jboss/ejb3/proxy/clustered/factory/session/stateless/StatelessSessionClusteredProxyFactory.java	2010-07-20 17:29:41 UTC (rev 106934)
@@ -1,196 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.ejb3.proxy.clustered.factory.session.stateless;
-
-import org.jboss.aop.Advisor;
-import org.jboss.aop.Dispatcher;
-import org.jboss.aop.advice.Interceptor;
-import org.jboss.ejb3.proxy.clustered.handler.session.stateless.StatelessClusteredProxyInvocationHandler;
-import org.jboss.ejb3.proxy.clustered.registry.ProxyClusteringInfo;
-import org.jboss.ejb3.proxy.clustered.registry.ProxyClusteringRegistry;
-import org.jboss.ejb3.proxy.impl.factory.session.stateless.StatelessSessionRemoteProxyFactory;
-import org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandler;
-import org.jboss.ha.client.loadbalance.LoadBalancePolicy;
-import org.jboss.logging.Logger;
-import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
-import org.jboss.remoting.InvokerLocator;
-
-/**
- * An SLSB Proxy Factory for Clustered Remote Views
- *
- * @author Brian Stansberry
- * 
- * @version $Revision: $
- */
-public class StatelessSessionClusteredProxyFactory extends StatelessSessionRemoteProxyFactory
-{
-   // --------------------------------------------------------------------------------||
-   // Class Members ------------------------------------------------------------------||
-   // --------------------------------------------------------------------------------||
-
-   private static final String STACK_NAME_CLUSTERED_STATELESS_SESSION_CLIENT_INTERCEPTORS = "ClusteredStatelessSessionClientInterceptors";
-
-   private static final Logger log = Logger.getLogger(StatelessSessionClusteredProxyFactory.class);
-   
-   // --------------------------------------------------------------------------------||
-   // Instance Members ---------------------------------------------------------------||
-   // --------------------------------------------------------------------------------||
-
-   private final ProxyClusteringRegistry registry;
-   private ProxyClusteringInfo beanClusteringInfo;
-   
-   // --------------------------------------------------------------------------------||
-   // Constructor --------------------------------------------------------------------||
-   // --------------------------------------------------------------------------------||
-
-   /**
-    * Constructor
-    * 
-    * @param name The unique name for this ProxyFactory
-    * @param containerName The name of the InvokableContext (container)
-    *   upon which Proxies will invoke
-    * @param containerGuid The globally-unique name of the container
-    * @param metadata The metadata representing this SLSB
-    * @param classloader The ClassLoader associated with the StatelessContainer
-    *       for which this ProxyFactory is to generate Proxies
-    * @param url The URL to use for remoting
-    * @param advisor The Advisor for proxies created by this factory
-    * @param interceptorStack
-    */
-   public StatelessSessionClusteredProxyFactory(final String name, final String containerName,
-         final String containerGuid, final JBossSessionBeanMetaData metadata, final ClassLoader classloader,
-         final String url, final Advisor advisor, final ProxyClusteringRegistry registry, final String interceptorStack)
-   {
-      // Call Super
-      super(name, containerName, containerGuid, metadata, classloader, url, advisor, interceptorStack);
-      
-      assert registry != null : "registry is null";
-      
-      this.registry = registry;
-   }
-
-   // --------------------------------------------------------------------------------||
-   // Functional Methods -------------------------------------------------------------||
-   // --------------------------------------------------------------------------------||
-
-   /**
-    * Return the name of the interceptor stack to apply to 
-    * proxies created by this proxy factory
-    * 
-    * @return
-    */
-   @Override
-   protected String getInterceptorStackName()
-   {
-      return STACK_NAME_CLUSTERED_STATELESS_SESSION_CLIENT_INTERCEPTORS;
-   }
-
-   // --------------------------------------------------------------------------------||
-   // Required Implementations -------------------------------------------------------||
-   // --------------------------------------------------------------------------------||
-
-   @Override
-   public void start() throws Exception
-   {
-      super.start();
-      
-      this.beanClusteringInfo = this.registry.registerClusteredBean(getContainerName(), getName(), getMetadata(), new InvokerLocator(getUrl()));
-      
-      // FIXME move to superclass
-      // Register with Remoting
-      log.debug("Registering with Remoting Dispatcher under name \"" + getName() + "\": " + this);
-      Dispatcher.singleton.registerTarget(getName(), this);
-   }
-
-   @Override
-   public void stop() throws Exception
-   {
-      this.registry.unregisterClusteredBean(this.beanClusteringInfo);
-      
-      // FIXME move to superclass
-      // Register with Remoting
-      log.debug("Unregistering name \"" + getName() + "\" from Remoting Dispatcher");
-      Dispatcher.singleton.unregisterTarget(getName());
-      
-      super.stop();
-   }
-   
-   
-   @Override
-   protected SessionProxyInvocationHandler createBusinessDefaultInvocationHandler()
-   {
-      return createInvocationHandler(null, false);
-   }
-
-   @Override
-   protected SessionProxyInvocationHandler createBusinessInterfaceSpecificInvocationHandler(String businessInterfaceName)
-   {
-      return createInvocationHandler(businessInterfaceName, false);
-   }
-
-   @Override
-   protected SessionProxyInvocationHandler createEjb2xComponentInterfaceInvocationHandler()
-   {
-      return createInvocationHandler(null, false);
-   }
-
-   @Override
-   protected SessionProxyInvocationHandler createHomeInvocationHandler()
-   {
-      return createInvocationHandler(null, true);
-   }
-
-   // --------------------------------------------------------------------------------||
-   // Private ------------------------------------------------------------------------||
-   // --------------------------------------------------------------------------------||
-   
-   private SessionProxyInvocationHandler createInvocationHandler(String businessInterfaceName, boolean isOnlyHome)   
-   {
-      // Obtain properties
-      String containerName = this.getContainerName();
-      String containerGuid = this.getContainerGuid();
-      String url = this.getUrl();
-
-      // Get Interceptors
-      Interceptor[] interceptors = this.getInterceptors();
-
-      Class<? extends LoadBalancePolicy> policyClass = isOnlyHome ? beanClusteringInfo.getHomeLoadBalancePolicy() : beanClusteringInfo.getLoadBalancePolicy();
-      LoadBalancePolicy lbp;
-      try
-      {
-         lbp = policyClass.newInstance();
-      }
-      catch (Exception e)
-      {
-         throw new RuntimeException("Cannot instantiate LoadBalancePolicy class " + policyClass);
-      }
-      
-      // Create
-      SessionProxyInvocationHandler handler = new StatelessClusteredProxyInvocationHandler(containerName, containerGuid,
-            interceptors, businessInterfaceName, url, beanClusteringInfo.getFamilyWrapper(), 
-            lbp, beanClusteringInfo.getPartitionName());
-
-      // Return
-      return handler;
-   }
-   
-}

Copied: projects/ejb3/tags/jboss-ejb3-proxy-clustered-1.0.4/src/main/java/org/jboss/ejb3/proxy/clustered/factory/session/stateless/StatelessSessionClusteredProxyFactory.java (from rev 106931, projects/ejb3/trunk/proxy-clustered/src/main/java/org/jboss/ejb3/proxy/clustered/factory/session/stateless/StatelessSessionClusteredProxyFactory.java)
===================================================================
--- projects/ejb3/tags/jboss-ejb3-proxy-clustered-1.0.4/src/main/java/org/jboss/ejb3/proxy/clustered/factory/session/stateless/StatelessSessionClusteredProxyFactory.java	                        (rev 0)
+++ projects/ejb3/tags/jboss-ejb3-proxy-clustered-1.0.4/src/main/java/org/jboss/ejb3/proxy/clustered/factory/session/stateless/StatelessSessionClusteredProxyFactory.java	2010-07-20 17:29:41 UTC (rev 106934)
@@ -0,0 +1,194 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.proxy.clustered.factory.session.stateless;
+
+import org.jboss.aop.Advisor;
+import org.jboss.aop.Dispatcher;
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.ejb3.proxy.clustered.handler.session.stateless.StatelessClusteredProxyInvocationHandler;
+import org.jboss.ejb3.proxy.clustered.registry.ProxyClusteringInfo;
+import org.jboss.ejb3.proxy.clustered.registry.ProxyClusteringRegistry;
+import org.jboss.ejb3.proxy.impl.factory.session.stateless.StatelessSessionRemoteProxyFactory;
+import org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandler;
+import org.jboss.ha.client.loadbalance.LoadBalancePolicy;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
+import org.jboss.remoting.InvokerLocator;
+
+/**
+ * An SLSB Proxy Factory for Clustered Remote Views
+ *
+ * @author Brian Stansberry
+ * 
+ * @version $Revision: $
+ */
+public class StatelessSessionClusteredProxyFactory extends StatelessSessionRemoteProxyFactory
+{
+   // --------------------------------------------------------------------------------||
+   // Class Members ------------------------------------------------------------------||
+   // --------------------------------------------------------------------------------||
+
+   private static final String STACK_NAME_CLUSTERED_STATELESS_SESSION_CLIENT_INTERCEPTORS = "ClusteredStatelessSessionClientInterceptors";
+
+   private static final Logger log = Logger.getLogger(StatelessSessionClusteredProxyFactory.class);
+   
+   // --------------------------------------------------------------------------------||
+   // Instance Members ---------------------------------------------------------------||
+   // --------------------------------------------------------------------------------||
+
+   private final ProxyClusteringRegistry registry;
+   private ProxyClusteringInfo beanClusteringInfo;
+   
+   // --------------------------------------------------------------------------------||
+   // Constructor --------------------------------------------------------------------||
+   // --------------------------------------------------------------------------------||
+
+   /**
+    * Constructor
+    * 
+    * @param name The unique name for this ProxyFactory
+    * @param containerName The name of the InvokableContext (container)
+    *   upon which Proxies will invoke
+    * @param containerGuid The globally-unique name of the container
+    * @param metadata The metadata representing this SLSB
+    * @param classloader The ClassLoader associated with the StatelessContainer
+    *       for which this ProxyFactory is to generate Proxies
+    * @param url The URL to use for remoting
+    * @param advisor The Advisor for proxies created by this factory
+    * @param interceptorStack
+    */
+   public StatelessSessionClusteredProxyFactory(final String name, final String containerName,
+         final String containerGuid, final JBossSessionBeanMetaData metadata, final ClassLoader classloader,
+         final String url, final Advisor advisor, final ProxyClusteringRegistry registry, final String interceptorStack)
+   {
+      // Call Super
+      super(name, containerName, containerGuid, metadata, classloader, url, advisor, interceptorStack);
+      
+      assert registry != null : "registry is null";
+      
+      this.registry = registry;
+   }
+
+   // --------------------------------------------------------------------------------||
+   // Functional Methods -------------------------------------------------------------||
+   // --------------------------------------------------------------------------------||
+
+   /**
+    * {@inheritDoc}
+    * @see org.jboss.ejb3.proxy.impl.factory.session.stateless.StatelessSessionRemoteProxyFactory#getDefaultInterceptorStackName()
+    */
+   @Override
+   protected String getDefaultInterceptorStackName()
+   {
+      return STACK_NAME_CLUSTERED_STATELESS_SESSION_CLIENT_INTERCEPTORS;
+   }
+
+   // --------------------------------------------------------------------------------||
+   // Required Implementations -------------------------------------------------------||
+   // --------------------------------------------------------------------------------||
+
+   @Override
+   public void start() throws Exception
+   {
+      super.start();
+      
+      this.beanClusteringInfo = this.registry.registerClusteredBean(getContainerName(), getName(), getMetadata(), new InvokerLocator(getUrl()));
+      
+      // FIXME move to superclass
+      // Register with Remoting
+      log.debug("Registering with Remoting Dispatcher under name \"" + getName() + "\": " + this);
+      Dispatcher.singleton.registerTarget(getName(), this);
+   }
+
+   @Override
+   public void stop() throws Exception
+   {
+      this.registry.unregisterClusteredBean(this.beanClusteringInfo);
+      
+      // FIXME move to superclass
+      // Register with Remoting
+      log.debug("Unregistering name \"" + getName() + "\" from Remoting Dispatcher");
+      Dispatcher.singleton.unregisterTarget(getName());
+      
+      super.stop();
+   }
+   
+   
+   @Override
+   protected SessionProxyInvocationHandler createBusinessDefaultInvocationHandler()
+   {
+      return createInvocationHandler(null, false);
+   }
+
+   @Override
+   protected SessionProxyInvocationHandler createBusinessInterfaceSpecificInvocationHandler(String businessInterfaceName)
+   {
+      return createInvocationHandler(businessInterfaceName, false);
+   }
+
+   @Override
+   protected SessionProxyInvocationHandler createEjb2xComponentInterfaceInvocationHandler()
+   {
+      return createInvocationHandler(null, false);
+   }
+
+   @Override
+   protected SessionProxyInvocationHandler createHomeInvocationHandler()
+   {
+      return createInvocationHandler(null, true);
+   }
+
+   // --------------------------------------------------------------------------------||
+   // Private ------------------------------------------------------------------------||
+   // --------------------------------------------------------------------------------||
+   
+   private SessionProxyInvocationHandler createInvocationHandler(String businessInterfaceName, boolean isOnlyHome)   
+   {
+      // Obtain properties
+      String containerName = this.getContainerName();
+      String containerGuid = this.getContainerGuid();
+      String url = this.getUrl();
+
+      // Get Interceptors
+      Interceptor[] interceptors = this.getInterceptors();
+
+      Class<? extends LoadBalancePolicy> policyClass = isOnlyHome ? beanClusteringInfo.getHomeLoadBalancePolicy() : beanClusteringInfo.getLoadBalancePolicy();
+      LoadBalancePolicy lbp;
+      try
+      {
+         lbp = policyClass.newInstance();
+      }
+      catch (Exception e)
+      {
+         throw new RuntimeException("Cannot instantiate LoadBalancePolicy class " + policyClass);
+      }
+      
+      // Create
+      SessionProxyInvocationHandler handler = new StatelessClusteredProxyInvocationHandler(containerName, containerGuid,
+            interceptors, businessInterfaceName, url, beanClusteringInfo.getFamilyWrapper(), 
+            lbp, beanClusteringInfo.getPartitionName());
+
+      // Return
+      return handler;
+   }
+   
+}



More information about the jboss-cvs-commits mailing list