[jboss-cvs] JBossAS SVN: r100564 - in projects/ejb3/trunk: core and 5 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Feb 5 13:04:41 EST 2010


Author: ALRubinger
Date: 2010-02-05 13:04:41 -0500 (Fri, 05 Feb 2010)
New Revision: 100564

Added:
   projects/ejb3/trunk/ext-api/src/main/java/org/jboss/ejb3/annotation/defaults/RemoteBindingDefaults.java
Modified:
   projects/ejb3/trunk/build/pom.xml
   projects/ejb3/trunk/core/pom.xml
   projects/ejb3/trunk/ext-api-impl/pom.xml
   projects/ejb3/trunk/ext-api-impl/src/main/java/org/jboss/ejb3/annotation/impl/RemoteBindingImpl.java
   projects/ejb3/trunk/ext-api/src/main/java/org/jboss/ejb3/annotation/RemoteBinding.java
   projects/ejb3/trunk/ext-api/src/test/java/org/jboss/ejb3/extapi/testcompilation/TestCompilationBean.java
Log:
[EJBTHREE-2008] Revert where we dropped @RemoteBinding.factory so we can keep backwards-compatiblity

Modified: projects/ejb3/trunk/build/pom.xml
===================================================================
--- projects/ejb3/trunk/build/pom.xml	2010-02-05 18:04:09 UTC (rev 100563)
+++ projects/ejb3/trunk/build/pom.xml	2010-02-05 18:04:41 UTC (rev 100564)
@@ -336,7 +336,7 @@
       <dependency>
         <groupId>org.jboss.metadata</groupId>
         <artifactId>jboss-metadata</artifactId>
-        <version>1.0.3</version>
+        <version>1.0.4-SNAPSHOT</version>
       </dependency>
 
       <dependency>

Modified: projects/ejb3/trunk/core/pom.xml
===================================================================
--- projects/ejb3/trunk/core/pom.xml	2010-02-05 18:04:09 UTC (rev 100563)
+++ projects/ejb3/trunk/core/pom.xml	2010-02-05 18:04:41 UTC (rev 100564)
@@ -7,7 +7,7 @@
   <parent>
     <groupId>org.jboss.ejb3</groupId>
     <artifactId>jboss-ejb3-build</artifactId>
-    <version>1.0.10</version>
+    <version>1.0.11-SNAPSHOT</version>
     <relativePath>../build/pom.xml</relativePath>
   </parent>
 
@@ -404,13 +404,13 @@
     <dependency>
       <groupId>org.jboss.ejb3</groupId>
       <artifactId>jboss-ejb3-ext-api</artifactId>
-      <version>1.1.0</version>
+      <version>1.1.1-SNAPSHOT</version>
     </dependency>
 
     <dependency>
       <groupId>org.jboss.ejb3</groupId>
       <artifactId>jboss-ejb3-ext-api-impl</artifactId>
-      <version>1.1.0</version>
+      <version>1.1.1-SNAPSHOT</version>
     </dependency>
 
     <dependency>

Modified: projects/ejb3/trunk/ext-api/src/main/java/org/jboss/ejb3/annotation/RemoteBinding.java
===================================================================
--- projects/ejb3/trunk/ext-api/src/main/java/org/jboss/ejb3/annotation/RemoteBinding.java	2010-02-05 18:04:09 UTC (rev 100563)
+++ projects/ejb3/trunk/ext-api/src/main/java/org/jboss/ejb3/annotation/RemoteBinding.java	2010-02-05 18:04:41 UTC (rev 100564)
@@ -26,6 +26,8 @@
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
+import org.jboss.ejb3.annotation.defaults.RemoteBindingDefaults;
+
 /**
  * Annotation for specifying the remote jndi binding for a bean as well
  * as the client interceptor stack, which is a stack-ref in JBoss AOP
@@ -45,5 +47,7 @@
 
    String clientBindUrl() default "";
    
-   String invokerName() default "";
+   String invokerName() default ""; 
+
+   String factory() default RemoteBindingDefaults.PROXY_FACTORY_DEFAULT;
 }

Copied: projects/ejb3/trunk/ext-api/src/main/java/org/jboss/ejb3/annotation/defaults/RemoteBindingDefaults.java (from rev 100062, projects/ejb3/trunk/ext-api/src/main/java/org/jboss/ejb3/annotation/defaults/RemoteBindingDefaults.java)
===================================================================
--- projects/ejb3/trunk/ext-api/src/main/java/org/jboss/ejb3/annotation/defaults/RemoteBindingDefaults.java	                        (rev 0)
+++ projects/ejb3/trunk/ext-api/src/main/java/org/jboss/ejb3/annotation/defaults/RemoteBindingDefaults.java	2010-02-05 18:04:41 UTC (rev 100564)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2007, 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.annotation.defaults;
+
+/**
+ * Default values for the @RemoteBinding annotation
+ * 
+ * @author <mailto:andrew.rubinger at redhat.com>ALR</a>
+ * @version $Revision $
+ */
+public interface RemoteBindingDefaults
+{
+   // Proxy Factory Implementations
+   
+   /*
+    * These keys are configured
+    * in the EJB3 Deployer Deployment file (ejb3-deployers-beans.xml)
+    * under the EJB3RemoteProxyFactoryRegistry 
+    */
+   
+   // Flag to denote default choice by container
+   String PROXY_FACTORY_DEFAULT = "RemoteProxyFactory";
+   
+   String PROXY_FACTORY_IMPLEMENTATION_IOR = "IORFactory";
+   
+   String PROXY_FACTORY_IMPLEMENTATION_SERVICE = "ServiceRemoteProxyFactory";
+   
+   String PROXY_FACTORY_STATEFUL_CLUSTER = "StatefulClusterProxyFactory";
+   
+   String PROXY_FACTORY_STATEFUL_REMOTE = "StatefulRemoteProxyFactory";
+   
+   String PROXY_FACTORY_STATELESS_CLUSTER = "StatelessClusterProxyFactory";
+   
+   String PROXY_FACTORY_STATELESS_REMOTE = "StatelessRemoteProxyFactory";
+}

Modified: projects/ejb3/trunk/ext-api/src/test/java/org/jboss/ejb3/extapi/testcompilation/TestCompilationBean.java
===================================================================
--- projects/ejb3/trunk/ext-api/src/test/java/org/jboss/ejb3/extapi/testcompilation/TestCompilationBean.java	2010-02-05 18:04:09 UTC (rev 100563)
+++ projects/ejb3/trunk/ext-api/src/test/java/org/jboss/ejb3/extapi/testcompilation/TestCompilationBean.java	2010-02-05 18:04:41 UTC (rev 100564)
@@ -36,6 +36,7 @@
 import org.jboss.ejb3.annotation.defaults.ClusteredDefaults;
 import org.jboss.ejb3.annotation.defaults.PersistenceManagerDefaults;
 import org.jboss.ejb3.annotation.defaults.PoolDefaults;
+import org.jboss.ejb3.annotation.defaults.RemoteBindingDefaults;
 import org.jboss.metadata.ejb.jboss.jndipolicy.spi.DefaultJndiBindingPolicy;
 
 /**
@@ -69,7 +70,7 @@
 @Producers(
 {@Producer(producer = Producer.class, connectionFactory = "", transacted = true, acknowledgeMode = 1)})
 @ProducerLocal
- at RemoteBindings(@RemoteBinding(jndiBinding="remoteBinding", interceptorStack="",clientBindUrl=""))
+ at RemoteBindings(@RemoteBinding(jndiBinding="remoteBinding", interceptorStack="",clientBindUrl="",factory=RemoteBindingDefaults.PROXY_FACTORY_DEFAULT))
 @RemoteHomeBinding(jndiBinding="remoteHomeBinding")
 @ResourceAdapter("resourceAdaptor")
 @RunAsPrincipal("principalName")

Modified: projects/ejb3/trunk/ext-api-impl/pom.xml
===================================================================
--- projects/ejb3/trunk/ext-api-impl/pom.xml	2010-02-05 18:04:09 UTC (rev 100563)
+++ projects/ejb3/trunk/ext-api-impl/pom.xml	2010-02-05 18:04:41 UTC (rev 100564)
@@ -41,7 +41,7 @@
     <dependency>
       <groupId>org.jboss.ejb3</groupId>
       <artifactId>jboss-ejb3-ext-api</artifactId>
-      <version>1.1.0</version>
+      <version>1.1.1-SNAPSHOT</version>
     </dependency>
 
     <dependency>

Modified: projects/ejb3/trunk/ext-api-impl/src/main/java/org/jboss/ejb3/annotation/impl/RemoteBindingImpl.java
===================================================================
--- projects/ejb3/trunk/ext-api-impl/src/main/java/org/jboss/ejb3/annotation/impl/RemoteBindingImpl.java	2010-02-05 18:04:09 UTC (rev 100563)
+++ projects/ejb3/trunk/ext-api-impl/src/main/java/org/jboss/ejb3/annotation/impl/RemoteBindingImpl.java	2010-02-05 18:04:41 UTC (rev 100564)
@@ -24,6 +24,7 @@
 import java.lang.annotation.Annotation;
 
 import org.jboss.ejb3.annotation.RemoteBinding;
+import org.jboss.ejb3.annotation.defaults.RemoteBindingDefaults;
 import org.jboss.ejb3.util.Debugger;
 
 /**
@@ -42,6 +43,8 @@
    
    private String invokerName;
 
+   private String proxyFactory;
+
    private StackTraceElement constructionPoint;
 
    public RemoteBindingImpl()
@@ -50,6 +53,7 @@
       stack = "";
       bindUrl = "";
       invokerName = "";
+      proxyFactory = RemoteBindingDefaults.PROXY_FACTORY_DEFAULT;
 
       this.constructionPoint = Debugger.constructionPoint();
    }
@@ -59,6 +63,7 @@
       this.jndi = jndi;
       this.stack = stack;
       this.bindUrl = bindUrl;
+      this.proxyFactory = proxyFactory;
 
       this.constructionPoint = Debugger.constructionPoint();
    }
@@ -69,6 +74,7 @@
       this.stack = stack;
       this.bindUrl = bindUrl;
       this.invokerName = invokerName;
+      this.proxyFactory = proxyFactory;
 
       this.constructionPoint = Debugger.constructionPoint();
    }
@@ -79,6 +85,11 @@
       this.stack = stack;
    }
 
+   public void setFactory(String factory)
+   {
+      this.proxyFactory = factory;
+   }
+
    public void setJndiBinding(String jndi)
    {
       this.jndi = jndi;
@@ -114,6 +125,11 @@
       return invokerName;
    }
 
+   public String factory()
+   {
+      return proxyFactory;
+   }
+
    public void merge(RemoteBinding annotation)
    {
       if (jndi.length() == 0)
@@ -124,6 +140,10 @@
 
       if (bindUrl.length() == 0)
          bindUrl = annotation.clientBindUrl();
+
+      if (proxyFactory.equals(RemoteBindingDefaults.PROXY_FACTORY_DEFAULT))
+         proxyFactory = annotation.factory();
+
    }
 
    public Class<? extends Annotation> annotationType()
@@ -138,6 +158,7 @@
       sb.append(", jndi=" + jndi);
       sb.append(", stack=" + stack);
       sb.append(", bindUrl=" + bindUrl);
+      sb.append(", proxyFactory=" + proxyFactory);
       sb.append(", constructionPoint=" + constructionPoint);
       sb.append(']');
       return sb.toString();




More information about the jboss-cvs-commits mailing list