[jboss-cvs] JBossAS SVN: r67517 - in trunk/ejb3/src: main/org/jboss/ejb3 and 7 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Nov 27 17:24:31 EST 2007


Author: ALRubinger
Date: 2007-11-27 17:24:31 -0500 (Tue, 27 Nov 2007)
New Revision: 67517

Added:
   trunk/ejb3/src/main/org/jboss/ejb3/remoting/ProxyFactoryNotRegisteredException.java
   trunk/ejb3/src/main/org/jboss/ejb3/remoting/RemoteProxyFactoryRegistry.java
Modified:
   trunk/ejb3/src/main/org/jboss/annotation/ejb/RemoteBindingImpl.java
   trunk/ejb3/src/main/org/jboss/ejb3/Ejb3Deployment.java
   trunk/ejb3/src/main/org/jboss/ejb3/Ejb3DescriptorHandler.java
   trunk/ejb3/src/main/org/jboss/ejb3/deployers/Ejb3Deployer.java
   trunk/ejb3/src/main/org/jboss/ejb3/remoting/RemoteProxyFactory.java
   trunk/ejb3/src/main/org/jboss/ejb3/session/ProxyDeployer.java
   trunk/ejb3/src/resources/META-INF/ejb3-deployers-beans.xml
   trunk/ejb3/src/resources/test/defaultremotebindings/default-ejb3-interceptors-aop.xml
   trunk/ejb3/src/test/org/jboss/ejb3/test/iiop/HomedStatelessBean.java
   trunk/ejb3/src/test/org/jboss/ejb3/test/iiop/MyServiceBean.java
   trunk/ejb3/src/test/org/jboss/ejb3/test/iiop/MySessionBean.java
   trunk/ejb3/src/test/org/jboss/ejb3/test/iiop/MyStatefulBean.java
   trunk/ejb3/src/test/org/jboss/ejb3/test/iiop/TxTesterBean.java
   trunk/ejb3/src/test/org/jboss/ejb3/test/stateful/ClusteredStatefulBean.java
   trunk/ejb3/src/test/org/jboss/ejb3/test/stateful/StatefulBean.java
   trunk/ejb3/src/test/org/jboss/ejb3/test/stateful/TreeCacheStatefulBean.java
Log:
[EJBTHREE-1133] Refactoring of core in conjunction with removal of internals from Ext-API

Modified: trunk/ejb3/src/main/org/jboss/annotation/ejb/RemoteBindingImpl.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/annotation/ejb/RemoteBindingImpl.java	2007-11-27 22:15:09 UTC (rev 67516)
+++ trunk/ejb3/src/main/org/jboss/annotation/ejb/RemoteBindingImpl.java	2007-11-27 22:24:31 UTC (rev 67517)
@@ -22,13 +22,8 @@
 package org.jboss.annotation.ejb;
 
 import java.lang.annotation.Annotation;
-import java.util.ArrayList;
 
-import javax.ejb.ActivationConfigProperty;
-import javax.ejb.MessageDriven;
-
-import org.jboss.annotation.ejb.RemoteBinding;
-import org.jboss.ejb3.remoting.RemoteProxyFactory;
+import org.jboss.ejb3.defaults.RemoteBindingDefaults;
 import org.jboss.ejb3.util.Debugger;
 
 /**
@@ -42,7 +37,7 @@
    private String jndi;
    private String stack;
    private String bindUrl;
-   private Class<? extends RemoteProxyFactory> proxyFactory;
+   private String proxyFactory;
    
    private StackTraceElement constructionPoint;
    
@@ -51,12 +46,12 @@
       jndi = "";
       stack = "";
       bindUrl = "";
-      proxyFactory = org.jboss.ejb3.remoting.RemoteProxyFactory.class;
+      proxyFactory = RemoteBindingDefaults.PROXY_FACTORY_DEFAULT;
       
       this.constructionPoint = Debugger.constructionPoint();
    }
 
-   public RemoteBindingImpl(String jndi, String stack, String bindUrl, Class<? extends RemoteProxyFactory> proxyFactory)
+   public RemoteBindingImpl(String jndi, String stack, String bindUrl, String proxyFactory)
    {
       this.jndi = jndi;
       this.stack = stack;
@@ -71,7 +66,7 @@
       this.stack = stack;
    }
    
-   public void setFactory(Class<? extends RemoteProxyFactory> factory)
+   public void setFactory(String factory)
    {
       this.proxyFactory = factory;
    }
@@ -101,7 +96,7 @@
       return bindUrl;
    }
 
-   public Class<? extends RemoteProxyFactory> factory()
+   public String factory()
    {
       return proxyFactory;
    }
@@ -117,7 +112,7 @@
       if (bindUrl.length() == 0)
          bindUrl = annotation.clientBindUrl();
       
-      if (proxyFactory == org.jboss.ejb3.remoting.RemoteProxyFactory.class)
+      if (proxyFactory.equals(RemoteBindingDefaults.PROXY_FACTORY_DEFAULT))
          proxyFactory = annotation.factory();
       
    }

Modified: trunk/ejb3/src/main/org/jboss/ejb3/Ejb3Deployment.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/Ejb3Deployment.java	2007-11-27 22:15:09 UTC (rev 67516)
+++ trunk/ejb3/src/main/org/jboss/ejb3/Ejb3Deployment.java	2007-11-27 22:24:31 UTC (rev 67517)
@@ -58,6 +58,7 @@
 import org.jboss.ejb3.javaee.JavaEEApplication;
 import org.jboss.ejb3.javaee.JavaEEComponent;
 import org.jboss.ejb3.javaee.JavaEEModule;
+import org.jboss.ejb3.remoting.RemoteProxyFactoryRegistry;
 import org.jboss.logging.Logger;
 import org.jboss.metadata.ejb.jboss.JBossMetaData;
 import org.jboss.metadata.javaee.spec.MessageDestinationsMetaData;
@@ -190,6 +191,11 @@
    {
       return this.getDeployer().getCacheFactoryRegistry();
    }
+   
+   public RemoteProxyFactoryRegistry getRemoteProxyFactoryRegistry()
+   {
+      return this.getDeployer().getRemoteProxyFactoryRegistry();
+   }
 
    /**
     * Returns a partial MBean attribute name of the form

Modified: trunk/ejb3/src/main/org/jboss/ejb3/Ejb3DescriptorHandler.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/Ejb3DescriptorHandler.java	2007-11-27 22:15:09 UTC (rev 67516)
+++ trunk/ejb3/src/main/org/jboss/ejb3/Ejb3DescriptorHandler.java	2007-11-27 22:24:31 UTC (rev 67517)
@@ -136,7 +136,6 @@
 import org.jboss.ejb3.mdb.MDB;
 import org.jboss.ejb3.mdb.ProducerImpl;
 import org.jboss.ejb3.mdb.ProducersImpl;
-import org.jboss.ejb3.remoting.RemoteProxyFactory;
 import org.jboss.ejb3.service.ServiceContainer;
 import org.jboss.ejb3.stateful.StatefulContainer;
 import org.jboss.logging.Logger;
@@ -1719,7 +1718,7 @@
             bindingAnnotation.setStack(binding.getInterceptorStack());
 
          if (binding.getProxyFactory() != null)
-            bindingAnnotation.setFactory((Class<? extends RemoteProxyFactory>) di.getClassLoader().loadClass(binding.getProxyFactory()));
+            bindingAnnotation.setFactory(binding.getProxyFactory());
 
          bindingAnnotationsList.add(bindingAnnotation);
 

Modified: trunk/ejb3/src/main/org/jboss/ejb3/deployers/Ejb3Deployer.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/deployers/Ejb3Deployer.java	2007-11-27 22:15:09 UTC (rev 67516)
+++ trunk/ejb3/src/main/org/jboss/ejb3/deployers/Ejb3Deployer.java	2007-11-27 22:24:31 UTC (rev 67517)
@@ -34,6 +34,7 @@
 import org.jboss.ejb3.Ejb3Deployment;
 import org.jboss.ejb3.cache.CacheFactoryRegistry;
 import org.jboss.ejb3.pool.PoolFactoryRegistry;
+import org.jboss.ejb3.remoting.RemoteProxyFactoryRegistry;
 import org.jboss.kernel.Kernel;
 import org.jboss.metadata.ejb.jboss.JBossMetaData;
 import org.jboss.virtual.VirtualFile;
@@ -64,6 +65,8 @@
    
    private PoolFactoryRegistry poolFactoryRegistry;
    
+   private RemoteProxyFactoryRegistry remoteProxyFactoryRegistry;
+   
    public Ejb3Deployer()
    {
       // TODO: when the annotation scanner deployer comes on, we will always have JBossMetaData
@@ -173,6 +176,16 @@
       this.poolFactoryRegistry = poolFactoryRegistry;
    }
 
+   public RemoteProxyFactoryRegistry getRemoteProxyFactoryRegistry()
+   {
+      return remoteProxyFactoryRegistry;
+   }
+
+   public void setRemoteProxyFactoryRegistry(RemoteProxyFactoryRegistry remoteProxyFactoryRegistry)
+   {
+      this.remoteProxyFactoryRegistry = remoteProxyFactoryRegistry;
+   }
+
    private boolean hasAllowedSuffix(String name)
    {
       if(allowedSuffixes == null)

Added: trunk/ejb3/src/main/org/jboss/ejb3/remoting/ProxyFactoryNotRegisteredException.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/remoting/ProxyFactoryNotRegisteredException.java	                        (rev 0)
+++ trunk/ejb3/src/main/org/jboss/ejb3/remoting/ProxyFactoryNotRegisteredException.java	2007-11-27 22:24:31 UTC (rev 67517)
@@ -0,0 +1,51 @@
+/*
+ * 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.remoting;
+
+/**
+ * ProxyFactoryNotRegisteredException
+ * 
+ * Thrown when attempting to retrieve a proxy factory with 
+ * unrecognized name from the registry
+ * 
+ * @author <a href="mailto:andrew.rubinger at redhat.com">ALR</a>
+ * @version $Revision: $
+ */
+public class ProxyFactoryNotRegisteredException extends Exception
+{
+
+   // Class Members
+   private static final long serialVersionUID = -881723607135494483L;
+
+   // Constructors
+
+   public ProxyFactoryNotRegisteredException()
+   {
+      super();
+   }
+
+   public ProxyFactoryNotRegisteredException(String message)
+   {
+      super(message);
+   }
+
+}


Property changes on: trunk/ejb3/src/main/org/jboss/ejb3/remoting/ProxyFactoryNotRegisteredException.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: trunk/ejb3/src/main/org/jboss/ejb3/remoting/RemoteProxyFactory.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/remoting/RemoteProxyFactory.java	2007-11-27 22:15:09 UTC (rev 67516)
+++ trunk/ejb3/src/main/org/jboss/ejb3/remoting/RemoteProxyFactory.java	2007-11-27 22:24:31 UTC (rev 67517)
@@ -21,7 +21,6 @@
  */
 package org.jboss.ejb3.remoting;
 
-import org.jboss.annotation.ejb.RemoteBinding;
 import org.jboss.ejb3.ProxyFactory;
 
 /**

Added: trunk/ejb3/src/main/org/jboss/ejb3/remoting/RemoteProxyFactoryRegistry.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/remoting/RemoteProxyFactoryRegistry.java	                        (rev 0)
+++ trunk/ejb3/src/main/org/jboss/ejb3/remoting/RemoteProxyFactoryRegistry.java	2007-11-27 22:24:31 UTC (rev 67517)
@@ -0,0 +1,73 @@
+/*
+ * 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.remoting;
+
+import java.util.Map;
+
+/**
+ * Registry for all configured Remote Proxy Factory implementations
+ * 
+ * @author <a href="mailto:andrew.rubinger at redhat.com">ALR</a>
+ * @version $Revision: $
+ */
+public class RemoteProxyFactoryRegistry
+{
+   // Instance Members
+   private Map<String, Class<? extends RemoteProxyFactory>> factories;
+
+   // Accessors / Mutators
+
+   public Map<String, Class<? extends RemoteProxyFactory>> getFactories()
+   {
+      return factories;
+   }
+
+   public void setFactories(Map<String, Class<? extends RemoteProxyFactory>> factories)
+   {
+      this.factories = factories;
+   }
+
+   // Functional Methods
+
+   /**
+    * Obtains the Proxy Factory Class with the specified registered name
+    * 
+    * @param name The registered name of the proxy factory to retrieve
+    * @return The Proxy Factory
+    */
+   public Class<? extends RemoteProxyFactory> getProxyFactoryClass(String name) throws ProxyFactoryNotRegisteredException
+   {
+      // Obtain cache factory
+      Class<? extends RemoteProxyFactory> proxyFactory = this.factories.get(name);
+
+      // Ensure registered
+      if (proxyFactory == null)
+      {
+         throw new ProxyFactoryNotRegisteredException("Remoting Proxy Factory with name " + name
+               + " is not registered.");
+      }
+      
+      // Return 
+      return proxyFactory;
+
+   }
+}


Property changes on: trunk/ejb3/src/main/org/jboss/ejb3/remoting/RemoteProxyFactoryRegistry.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: trunk/ejb3/src/main/org/jboss/ejb3/session/ProxyDeployer.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/session/ProxyDeployer.java	2007-11-27 22:15:09 UTC (rev 67516)
+++ trunk/ejb3/src/main/org/jboss/ejb3/session/ProxyDeployer.java	2007-11-27 22:24:31 UTC (rev 67517)
@@ -33,6 +33,7 @@
 import org.jboss.annotation.ejb.RemoteBindingsImpl;
 import org.jboss.ejb3.ProxyFactory;
 import org.jboss.ejb3.ProxyFactoryHelper;
+import org.jboss.ejb3.defaults.RemoteBindingDefaults;
 import org.jboss.ejb3.remoting.RemoteProxyFactory;
 import org.jboss.logging.Logger;
 
@@ -69,14 +70,15 @@
             assert binding.jndiBinding().length() != 0 : "jndiBinding not set on binding " + binding;
             
             RemoteProxyFactory factory;
-            Class<? extends RemoteProxyFactory> factoryClass = binding.factory();
-            if (factoryClass.equals(RemoteProxyFactory.class))
+            String factoryImplementationRegistryKey = binding.factory();
+            if (factoryImplementationRegistryKey.equals(RemoteBindingDefaults.PROXY_FACTORY_DEFAULT))
             {
                factory = container.createRemoteProxyFactory(binding);
             }
             else
             {
-               Constructor<? extends RemoteProxyFactory> constructor = factoryClass.getConstructor(SessionContainer.class, RemoteBinding.class);
+               Class<? extends RemoteProxyFactory> remoteFactoryClass = container.getDeployment().getRemoteProxyFactoryRegistry().getProxyFactoryClass(binding.factory());
+               Constructor<? extends RemoteProxyFactory> constructor = remoteFactoryClass.getConstructor(SessionContainer.class, RemoteBinding.class);
                factory = constructor.newInstance(container, binding);
             }
             factory.start();
@@ -151,7 +153,7 @@
                String jndiName = ProxyFactoryHelper.getDefaultRemoteJndiName(container);
                log.debug("default remote binding has jndiName of " + jndiName);
                String uri = ""; // use the default
-               RemoteBinding[] list = {new RemoteBindingImpl(jndiName, "", uri, RemoteProxyFactory.class)};
+               RemoteBinding[] list = {new RemoteBindingImpl(jndiName, "", uri, RemoteBindingDefaults.PROXY_FACTORY_DEFAULT)};
                remoteBindings = new RemoteBindingsImpl(list);
                container.getAnnotations().addClassAnnotation(RemoteBindings.class, remoteBindings);
             }

Modified: trunk/ejb3/src/resources/META-INF/ejb3-deployers-beans.xml
===================================================================
--- trunk/ejb3/src/resources/META-INF/ejb3-deployers-beans.xml	2007-11-27 22:15:09 UTC (rev 67516)
+++ trunk/ejb3/src/resources/META-INF/ejb3-deployers-beans.xml	2007-11-27 22:24:31 UTC (rev 67517)
@@ -16,6 +16,7 @@
       <property name="defaultPersistenceProperties"><inject bean="DefaultPersistenceProperties" property="properties"/></property>
       <property name="cacheFactoryRegistry"><inject bean="EJB3CacheFactoryRegistry" /></property>
       <property name="poolFactoryRegistry"><inject bean="EJB3PoolFactoryRegistry" /></property>
+      <property name="remoteProxyFactoryRegistry"><inject bean="EJB3RemoteProxyFactoryRegistry" /></property>
       
       <!-- 
    
@@ -186,6 +187,51 @@
          </map>
       </property>
    </bean>
+   
+   <!-- Remoting Proxy Factory Registry -->
+   <bean name="EJB3RemoteProxyFactoryRegistry" class="org.jboss.ejb3.remoting.RemoteProxyFactoryRegistry">
+      <property name="factories">
+         <!-- Define each of the registered factories -->
+         <map class="java.util.HashMap" keyClass="java.lang.String"
+            valueClass="java.lang.Class">
+            <!-- RemoteProxyFactory -->
+            <entry>
+               <key>RemoteProxyFactory</key>
+               <value>org.jboss.ejb3.remoting.RemoteProxyFactory</value>
+            </entry>
+            <!-- IORFactory -->
+            <entry>
+               <key>IORFactory</key>
+               <value>org.jboss.ejb3.iiop.IORFactory</value>
+            </entry>
+            <!-- ServiceRemoteProxyFactory -->
+            <entry>
+               <key>ServiceRemoteProxyFactory</key>
+               <value>org.jboss.ejb3.service.ServiceRemoteProxyFactory</value>
+            </entry>
+            <!-- StatefulClusterProxyFactory -->
+            <entry>
+               <key>StatefulClusterProxyFactory</key>
+               <value>org.jboss.ejb3.stateful.StatefulClusterProxyFactory</value>
+            </entry>
+            <!-- StatefulRemoteProxyFactory -->
+            <entry>
+               <key>StatefulRemoteProxyFactory</key>
+               <value>org.jboss.ejb3.stateful.StatefulRemoteProxyFactory</value>
+            </entry>
+            <!-- StatelessClusterProxyFactory -->
+            <entry>
+               <key>StatelessClusterProxyFactory</key>
+               <value>org.jboss.ejb3.stateless.StatelessClusterProxyFactory</value>
+            </entry>
+            <!-- StatelessRemoteProxyFactory -->
+            <entry>
+               <key>StatelessRemoteProxyFactory</key>
+               <value>org.jboss.ejb3.stateless.StatelessRemoteProxyFactory</value>
+            </entry>            
+         </map>
+      </property>
+   </bean>
    
    <bean name="JNDIKernelRegistryPlugin" class="org.jboss.ejb3.kernel.JNDIKernelRegistryPlugin"/>
 </deployment>

Modified: trunk/ejb3/src/resources/test/defaultremotebindings/default-ejb3-interceptors-aop.xml
===================================================================
--- trunk/ejb3/src/resources/test/defaultremotebindings/default-ejb3-interceptors-aop.xml	2007-11-27 22:15:09 UTC (rev 67516)
+++ trunk/ejb3/src/resources/test/defaultremotebindings/default-ejb3-interceptors-aop.xml	2007-11-27 22:24:31 UTC (rev 67517)
@@ -46,7 +46,7 @@
          @org.jboss.annotation.ejb.Pool (value="ThreadlocalPool", maxSize=30, timeout=10000)
       </annotation>
       <annotation expr="!class(@org.jboss.annotation.ejb.RemoteBinding)">
-         @org.jboss.annotation.ejb.RemoteBinding (jndiBinding="DefaultedStateless", factory = org.jboss.ejb3.remoting.RemoteProxyFactory.class, interceptorStack="", clientBindUrl = "")
+         @org.jboss.annotation.ejb.RemoteBinding (jndiBinding="DefaultedStateless", factory = "RemoteProxyFactory", interceptorStack="", clientBindUrl = "")
       </annotation>
    </domain>
 </aop>
\ No newline at end of file

Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/iiop/HomedStatelessBean.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/iiop/HomedStatelessBean.java	2007-11-27 22:15:09 UTC (rev 67516)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/iiop/HomedStatelessBean.java	2007-11-27 22:24:31 UTC (rev 67517)
@@ -29,7 +29,7 @@
 import javax.ejb.Stateless;
 
 import org.jboss.annotation.ejb.RemoteBinding;
-import org.jboss.ejb3.iiop.IORFactory;
+import org.jboss.ejb3.defaults.RemoteBindingDefaults;
 
 /**
  * Comment
@@ -40,7 +40,7 @@
 @Stateless
 @Remote(MySession.class)
 @RemoteHome(HomedStatelessHome.class)
- at RemoteBinding(factory=IORFactory.class)
+ at RemoteBinding(factory=RemoteBindingDefaults.PROXY_FACTORY_IMPLEMENTATION_IOR)
 public class HomedStatelessBean
 {
    @Resource SessionContext ctx;

Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/iiop/MyServiceBean.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/iiop/MyServiceBean.java	2007-11-27 22:15:09 UTC (rev 67516)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/iiop/MyServiceBean.java	2007-11-27 22:24:31 UTC (rev 67517)
@@ -25,7 +25,7 @@
 
 import org.jboss.annotation.ejb.RemoteBinding;
 import org.jboss.annotation.ejb.Service;
-import org.jboss.ejb3.iiop.IORFactory;
+import org.jboss.ejb3.defaults.RemoteBindingDefaults;
 import org.jboss.logging.Logger;
 
 /**
@@ -36,7 +36,7 @@
  */
 @Service
 @Remote(MyStateful.class)
- at RemoteBinding(factory=IORFactory.class)
+ at RemoteBinding(factory=RemoteBindingDefaults.PROXY_FACTORY_IMPLEMENTATION_IOR)
 public class MyServiceBean
 {
    @SuppressWarnings("unused")

Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/iiop/MySessionBean.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/iiop/MySessionBean.java	2007-11-27 22:15:09 UTC (rev 67516)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/iiop/MySessionBean.java	2007-11-27 22:24:31 UTC (rev 67517)
@@ -30,7 +30,7 @@
 import org.jboss.annotation.ejb.IIOP;
 import org.jboss.annotation.ejb.RemoteBinding;
 import org.jboss.annotation.security.SecurityDomain;
-import org.jboss.ejb3.iiop.IORFactory;
+import org.jboss.ejb3.defaults.RemoteBindingDefaults;
 
 /**
  * Comment
@@ -40,7 +40,7 @@
  */
 @Stateless
 @Remote(MySession.class)
- at RemoteBinding(factory=IORFactory.class)
+ at RemoteBinding(factory=RemoteBindingDefaults.PROXY_FACTORY_IMPLEMENTATION_IOR)
 @IIOP(interfaceRepositorySupported=false)
 @SecurityDomain("other")
 public class MySessionBean

Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/iiop/MyStatefulBean.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/iiop/MyStatefulBean.java	2007-11-27 22:15:09 UTC (rev 67516)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/iiop/MyStatefulBean.java	2007-11-27 22:24:31 UTC (rev 67517)
@@ -33,7 +33,7 @@
 import javax.ejb.Stateful;
 
 import org.jboss.annotation.ejb.RemoteBinding;
-import org.jboss.ejb3.iiop.IORFactory;
+import org.jboss.ejb3.defaults.RemoteBindingDefaults;
 import org.jboss.logging.Logger;
 
 /**
@@ -45,7 +45,7 @@
 @Stateful
 @Remote(MyStateful.class)
 @RemoteHome(MyStatefulHome.class)
- at RemoteBinding(factory=IORFactory.class)
+ at RemoteBinding(factory=RemoteBindingDefaults.PROXY_FACTORY_IMPLEMENTATION_IOR)
 public class MyStatefulBean
 {
    private static final Logger log = Logger.getLogger(MyStatefulBean.class);

Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/iiop/TxTesterBean.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/iiop/TxTesterBean.java	2007-11-27 22:15:09 UTC (rev 67516)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/iiop/TxTesterBean.java	2007-11-27 22:24:31 UTC (rev 67517)
@@ -33,10 +33,10 @@
 import javax.transaction.Transaction;
 import javax.transaction.TransactionManager;
 
-import org.jboss.logging.Logger;
 import org.jboss.annotation.JndiInject;
 import org.jboss.annotation.ejb.RemoteBinding;
-import org.jboss.ejb3.iiop.IORFactory;
+import org.jboss.ejb3.defaults.RemoteBindingDefaults;
+import org.jboss.logging.Logger;
 
 /**
  * Comment
@@ -46,7 +46,7 @@
  */
 @Stateless
 @Remote(TxTester.class)
- at RemoteBinding(factory=IORFactory.class)
+ at RemoteBinding(factory=RemoteBindingDefaults.PROXY_FACTORY_IMPLEMENTATION_IOR)
 @TransactionManagement(TransactionManagementType.CONTAINER)
 public class TxTesterBean
 {

Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/stateful/ClusteredStatefulBean.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/stateful/ClusteredStatefulBean.java	2007-11-27 22:15:09 UTC (rev 67516)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/stateful/ClusteredStatefulBean.java	2007-11-27 22:24:31 UTC (rev 67517)
@@ -43,6 +43,7 @@
 import org.jboss.annotation.ejb.cache.CacheConfig;
 import org.jboss.annotation.security.SecurityDomain;
 import org.jboss.ejb3.Container;
+import org.jboss.ejb3.defaults.RemoteBindingDefaults;
 import org.jboss.logging.Logger;
 import org.jboss.serial.io.JBossObjectInputStream;
 import org.jboss.serial.io.JBossObjectOutputStream;
@@ -55,7 +56,7 @@
 @Local(org.jboss.ejb3.test.stateful.StatefulLocal.class)
 @RemoteBinding(jndiBinding = "ClusteredStateful",
                interceptorStack="RemoteBindingStatefulSessionClientInterceptors",
-               factory = org.jboss.ejb3.test.stateful.StatefulRemoteProxyFactory.class)
+               factory = RemoteBindingDefaults.PROXY_FACTORY_STATEFUL_REMOTE)
 @CacheConfig(maxSize = 1000, idleTimeoutSeconds = 1, name="jboss.cache:service=EJB3SFSBClusteredCache")
 @SecurityDomain("test")
 @Resources({@Resource(name="jdbc/ds", mappedName="java:/DefaultDS")})

Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/stateful/StatefulBean.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/stateful/StatefulBean.java	2007-11-27 22:15:09 UTC (rev 67516)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/stateful/StatefulBean.java	2007-11-27 22:24:31 UTC (rev 67517)
@@ -42,6 +42,7 @@
 import org.jboss.annotation.ejb.cache.CacheConfig;
 import org.jboss.annotation.security.SecurityDomain;
 import org.jboss.ejb3.Container;
+import org.jboss.ejb3.defaults.RemoteBindingDefaults;
 import org.jboss.logging.Logger;
 import org.jboss.serial.io.JBossObjectInputStream;
 import org.jboss.serial.io.JBossObjectOutputStream;
@@ -57,7 +58,7 @@
 @Local(org.jboss.ejb3.test.stateful.StatefulLocal.class)
 @RemoteBinding(jndiBinding = "Stateful",
                interceptorStack="RemoteBindingStatefulSessionClientInterceptors",
-               factory = org.jboss.ejb3.test.stateful.StatefulRemoteProxyFactory.class)
+               factory = RemoteBindingDefaults.PROXY_FACTORY_STATEFUL_REMOTE)
 @CacheConfig(maxSize = 1000, idleTimeoutSeconds = 1)
 @SecurityDomain("test")
 @Resources({@Resource(name="jdbc/ds", mappedName="java:/DefaultDS")})

Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/stateful/TreeCacheStatefulBean.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/stateful/TreeCacheStatefulBean.java	2007-11-27 22:15:09 UTC (rev 67516)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/stateful/TreeCacheStatefulBean.java	2007-11-27 22:24:31 UTC (rev 67517)
@@ -44,6 +44,7 @@
 import org.jboss.annotation.ejb.cache.CacheConfig;
 import org.jboss.annotation.security.SecurityDomain;
 import org.jboss.ejb3.Container;
+import org.jboss.ejb3.defaults.RemoteBindingDefaults;
 import org.jboss.logging.Logger;
 import org.jboss.serial.io.JBossObjectInputStream;
 import org.jboss.serial.io.JBossObjectOutputStream;
@@ -51,31 +52,29 @@
 /**
  * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
  */
- at Stateful(name="TreeCacheStatefulBean")
+ at Stateful(name = "TreeCacheStatefulBean")
 @Remote(org.jboss.ejb3.test.stateful.Stateful.class)
 @Local(org.jboss.ejb3.test.stateful.StatefulLocal.class)
- at RemoteBinding(jndiBinding = "TreeCacheStateful",
-               interceptorStack="RemoteBindingStatefulSessionClientInterceptors",
-               factory = org.jboss.ejb3.test.stateful.StatefulRemoteProxyFactory.class)
- at CacheConfig(name="jboss.cache:service=EJB3SFSBClusteredCache", maxSize = 1000, idleTimeoutSeconds = 1)
+ at RemoteBinding(jndiBinding = "TreeCacheStateful", interceptorStack = "RemoteBindingStatefulSessionClientInterceptors", factory = RemoteBindingDefaults.PROXY_FACTORY_STATEFUL_REMOTE)
+ at CacheConfig(name = "jboss.cache:service=EJB3SFSBClusteredCache", maxSize = 1000, idleTimeoutSeconds = 1)
 @SecurityDomain("test")
- at Resources({@Resource(name="jdbc/ds", mappedName="java:/DefaultDS")})
+ at Resources(
+{@Resource(name = "jdbc/ds", mappedName = "java:/DefaultDS")})
 @Cache("StatefulTreeCache")
 public class TreeCacheStatefulBean implements org.jboss.ejb3.test.stateful.Stateful
 {
    private static final Logger log = Logger.getLogger(StatefulBean.class);
-   
+
    @Resource
    private SessionContext sessionContext;
-   
-   @Resource(mappedName="java:/DefaultDS")
+
+   @Resource(mappedName = "java:/DefaultDS")
    private transient javax.sql.DataSource datasource;
-   
-   @Resource(mappedName="java:/ConnectionFactory")
-   public transient javax.jms.QueueConnectionFactory connectionFactory; 
 
+   @Resource(mappedName = "java:/ConnectionFactory")
+   public transient javax.jms.QueueConnectionFactory connectionFactory;
+
    private String state;
-   private int stuff;
 
    @Interceptors(MyInterceptor.class)
    public String getInterceptorState()
@@ -88,18 +87,19 @@
    {
       throw new RuntimeException("NOT REACHABLE");
    }
-   
+
    public boolean testSessionContext()
    {
       return sessionContext.isCallerInRole("role");
    }
-   
+
    public void testResources() throws Exception
    {
       datasource.toString();
       connectionFactory.toString();
-      
-      javax.sql.DataSource ds = (javax.sql.DataSource)new InitialContext().lookup(Container.ENC_CTX_NAME + "/env/jdbc/ds");
+
+      javax.sql.DataSource ds = (javax.sql.DataSource) new InitialContext().lookup(Container.ENC_CTX_NAME
+            + "/env/jdbc/ds");
       ds.toString();
    }
 
@@ -134,10 +134,10 @@
    @PrePassivate
    public void passivate()
    {
-      log.info("************ passivating");  
+      log.info("************ passivating");
       wasPassivated = true;
    }
-   
+
    @PostActivate
    public void activate()
    {
@@ -164,7 +164,7 @@
          ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
 
          JBossObjectInputStream is = new JBossObjectInputStream(bais);
-         bean = (TreeCacheStatefulBean)is.readObject();
+         bean = (TreeCacheStatefulBean) is.readObject();
       }
       catch (IOException e)
       {
@@ -175,7 +175,8 @@
          throw new RuntimeException(e);
       }
 
-      if (!state.equals(bean.state)) throw new RuntimeException("failed to serialize: " + bean.state);
+      if (!state.equals(bean.state))
+         throw new RuntimeException("failed to serialize: " + bean.state);
    }
 
    public boolean wasPassivated()
@@ -191,25 +192,25 @@
    @Init
    public void ejbCreate(Integer state)
    {
-      this.state=state.toString();
+      this.state = state.toString();
    }
 
    @Init
    public void ejbCreate(State state)
    {
-      this.state=state.getState();
+      this.state = state.getState();
    }
 
    @Init
    public void ejbCreate(String state)
    {
-      this.state=state;
+      this.state = state;
    }
-   
+
    @Remove
    public void removeBean()
    {
-      
+
    }
 
    public void lookupStateful() throws Exception
@@ -217,7 +218,7 @@
       // FIXME: NYI
       throw new RuntimeException("NYI");
    }
-   
+
    public void testStateful() throws Exception
    {
       // FIXME: NYI




More information about the jboss-cvs-commits mailing list