[jboss-cvs] JBossAS SVN: r68202 - in trunk/ejb3: src/resources/test-configs and 8 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Dec 12 16:01:31 EST 2007


Author: bdecoste
Date: 2007-12-12 16:01:31 -0500 (Wed, 12 Dec 2007)
New Revision: 68202

Added:
   trunk/ejb3/src/resources/test-configs/statefulproxyfactoryoverride/
   trunk/ejb3/src/resources/test-configs/statefulproxyfactoryoverride/deployers/
   trunk/ejb3/src/resources/test-configs/statefulproxyfactoryoverride/deployers/ejb3.deployer/
   trunk/ejb3/src/resources/test-configs/statefulproxyfactoryoverride/deployers/ejb3.deployer/META-INF/
   trunk/ejb3/src/resources/test-configs/statefulproxyfactoryoverride/deployers/ejb3.deployer/META-INF/ejb3-deployers-beans.xml
   trunk/ejb3/src/resources/test-configs/statefulproxyfactoryoverride/lib/
   trunk/ejb3/src/test/org/jboss/ejb3/test/statefulproxyfactoryoverride/
   trunk/ejb3/src/test/org/jboss/ejb3/test/statefulproxyfactoryoverride/ProxyFactoryInterface.java
   trunk/ejb3/src/test/org/jboss/ejb3/test/statefulproxyfactoryoverride/StatefulBean.java
   trunk/ejb3/src/test/org/jboss/ejb3/test/statefulproxyfactoryoverride/StatefulRemote.java
   trunk/ejb3/src/test/org/jboss/ejb3/test/statefulproxyfactoryoverride/StatefulRemoteProxyFactory.java
   trunk/ejb3/src/test/org/jboss/ejb3/test/statefulproxyfactoryoverride/unit/
   trunk/ejb3/src/test/org/jboss/ejb3/test/statefulproxyfactoryoverride/unit/RemoteUnitTestCase.java
Modified:
   trunk/ejb3/build-test.xml
   trunk/ejb3/src/test/org/jboss/ejb3/test/stateful/unit/RemoteUnitTestCase.java
Log:
moved RemoteBinding.factory override to seperate test

Modified: trunk/ejb3/build-test.xml
===================================================================
--- trunk/ejb3/build-test.xml	2007-12-12 20:48:27 UTC (rev 68201)
+++ trunk/ejb3/build-test.xml	2007-12-12 21:01:31 UTC (rev 68202)
@@ -3021,7 +3021,27 @@
          </fileset>
       </jar>
    </target>
+	
+   <target name="statefulproxyfactoryoverride"
+      description="Builds all jar files."
+      depends="compile-classes">
 
+      <mkdir dir="${build.lib}"/>
+
+      <jar jarfile="${build.lib}/statefulproxyfactoryoverride-test.jar">
+         <fileset dir="${build.classes}">
+            <include name="org/jboss/ejb3/test/statefulproxyfactoryoverride/*.class"/>
+	        <exclude name="org/jboss/ejb3/test/statefulproxyfactoryoverride/*Factory*.class"/>
+         </fileset>
+      </jar>
+	
+	  <jar jarfile="${resources}/test-configs/statefulproxyfactoryoverride/lib/statefulproxyfactoryoverride.jar">
+         <fileset dir="${build.classes}">
+	        <include name="org/jboss/ejb3/test/statefulproxyfactoryoverride/*Factory*.class"/>
+         </fileset>
+      </jar>
+   </target>
+
    <target name="stateful"
       description="Builds all jar files."
       depends="compile-classes">
@@ -3904,7 +3924,7 @@
 	  </jar>
    </target>
    
-   <target name="jars" depends="mdbsessionpoolclear, removedislocal, statelesscreation, defaultremotebindings, localfromremote, clusteredjms, entityoptimisticlocking, concurrentnaming, propertyreplacement, persistenceunits, appclient, tck5sec, invalidtxmdb, descriptortypo, libdeployment, homeinterface, arjuna, mdbtransactions, unauthenticatedprincipal, clusteredservice, invoker, classloader,
+   <target name="jars" depends="statefulproxyfactoryoverride, mdbsessionpoolclear, removedislocal, statelesscreation, defaultremotebindings, localfromremote, clusteredjms, entityoptimisticlocking, concurrentnaming, propertyreplacement, persistenceunits, appclient, tck5sec, invalidtxmdb, descriptortypo, libdeployment, homeinterface, arjuna, mdbtransactions, unauthenticatedprincipal, clusteredservice, invoker, classloader,
       circulardependency, jsp, timerdependency, servicedependency, servlet, stateless14, webservices, ear, ejbthree440,
       ejbthree454, ejbthree653, ejbthree670, ejbthree712, ejbthree724, ejbthree751,
       ejbthree785, 
@@ -4531,6 +4551,7 @@
 	  <!--antcall target="multi-instance-localfromremote-test"  inheritRefs="true"/-->
 	  <antcall target="statelesscreation-test"  inheritRefs="true"/>
 	  <antcall target="removedislocal-test"  inheritRefs="true"/>
+	  <antcall target="statefulproxyfactoryoverride-test"  inheritRefs="true"/>
    </target>
 
    <target name="no-start-jboss-tests" depends="init" description="Execute all tests">
@@ -5092,7 +5113,28 @@
       <stop-jboss/>
       <wait-on-shutdown conf="libdeployment"/>
    </target>
+	
+   <target name="statefulproxyfactoryoverride-test" depends="init">
+      <create-config baseconf="all" newconf="statefulproxyfactoryoverride">
+         <patternset>
+            <include name="conf/**"/>
+            <include name="deploy*/**"/>
+            <include name="lib/**"/>
+	        <include name="deployers/**"/>
+         </patternset>
+      </create-config>
 
+      <start-jboss conf="statefulproxyfactoryoverride" host="${node0}" jvmargs="${ejb3.jboss.jvmargs}"/>
+      <wait-on-host/>
+
+      <antcall target="test" inheritRefs="true">
+         <param name="test" value="statefulproxyfactoryoverride"/>
+      </antcall>
+
+      <stop-jboss/>
+      <wait-on-shutdown conf="statefulproxyfactoryoverride"/>
+   </target>
+
    <target name="ssl-simple-test" depends="init">
      <create-config baseconf="all" newconf="ejb3-ssl">
          <patternset>

Added: trunk/ejb3/src/resources/test-configs/statefulproxyfactoryoverride/deployers/ejb3.deployer/META-INF/ejb3-deployers-beans.xml
===================================================================
--- trunk/ejb3/src/resources/test-configs/statefulproxyfactoryoverride/deployers/ejb3.deployer/META-INF/ejb3-deployers-beans.xml	                        (rev 0)
+++ trunk/ejb3/src/resources/test-configs/statefulproxyfactoryoverride/deployers/ejb3.deployer/META-INF/ejb3-deployers-beans.xml	2007-12-12 21:01:31 UTC (rev 68202)
@@ -0,0 +1,264 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+    JCA Deployers
+-->
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+   <!-- TODO this should be removed later on when ENC gets changed -->
+   <bean name="java:comp/Initializer" class="org.jboss.ejb3.embedded.JavaCompInitializer"/>
+   <bean name="DefaultPersistenceProperties" class="org.jboss.ejb3.DefaultPersistenceProperties"/>
+
+   <bean name="Ejb3Deployer" class="org.jboss.ejb3.deployers.Ejb3Deployer">
+      <property name="type">ejb3x</property>
+      <property name="kernel"><inject bean="jboss.kernel:service=Kernel"/></property>
+      <property name="mbeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property>
+      <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>
+      <property name="persistenceManagerFactoryRegistry"><inject bean="EJB3PersistenceManagerFactoryRegistry" /></property>
+      
+      <!-- 
+   
+      Configure the deployer to optionally require a deployment 
+      descriptor for deployable units.  By turning this switch to "true", 
+      "META-INF/jboss.xml" or the EJB3 Deployment Descriptor "META-INF/ejb-jar.xml" 
+      will be required for deployment, enabling a performance increace in deployment by
+      not scanning for annotations in non-deployable EJB3 JARs.
+      
+      Default for this value is "false".
+      
+      -->
+      <property name="deploymentDescriptorRequired">false</property>
+      
+      <property name="ignoredJarsSet">
+         <set elementClass="java.lang.String">
+            <value>snmp-adaptor.jar</value>
+            <value>otherimages.jar</value>
+            <value>applet.jar</value>
+            <value>jcommon.jar</value>
+            <value>console-mgr-classes.jar</value>
+            <value>jfreechart.jar</value>
+            <value>juddi-service.jar</value>
+            <value>wsdl4j.jar</value>
+            <value>commons-collections.jar</value>
+            <value>commons-pool.jar</value>
+            <value>juddi.jar</value>
+            <value>commons-discovery.jar</value>
+            <value>uddi4j.jar</value>
+            <value>axis.jar</value>
+            <value>commons-dbcp.jar</value>
+            <value>jboss-juddiaxis.jar</value>
+            <value>trove.jar</value>
+            <value>javassist.jar</value>
+            <value>jboss-aop-jdk50.jar</value>
+            <value>jboss-aspect-library-jdk50.jar</value>
+            <value>ejb3-persistence.jar</value>
+            <value>commons-validator-1.1.3.jar</value>
+            <value>commons-collections.jar</value>
+            <value>commons-fileupload.jar</value>
+            <value>commons-pool.jar</value>
+            <value>hibernate-entitymanager.jar</value>
+            <value>jboss-ejb3x.jar</value>
+            <value>commons-digester-1.6.jar</value>
+            <value>cglib-2.1.1.jar</value>
+            <value>commons-discovery.jar</value>
+            <value>jboss-annotations-ejb3.jar</value>
+            <value>jaxen-1.1-beta-4.jar</value>
+            <value>hibernate-annotations.jar</value>
+            <value>commons-httpclient.jar</value>
+            <value>commons-logging.jar</value>
+            <value>commons-vfs.jar</value>
+            <value>hibernate3.jar</value>
+            <value>commons-logging-api.jar</value>
+            <value>asm.jar</value>
+            <value>asm-attrs.jar</value>
+            <value>commons-lang-2.0.jar</value>
+            <value>commons-beanutils.jar</value>
+            <value>jboss-ejb3.jar</value>
+            <value>dom4j.jar</value>
+            <value>commons-codec-1.2.jar</value>
+            <value>wsdl4j.jar</value>
+            <value>xmlsec.jar</value>
+            <value>jbossws.jar</value>
+            <value>jboss-bean-deployer.jar</value>
+            <value>jboss-microcontainer.jar</value>
+            <value>jboss-dependency.jar</value>
+            <value>jboss-container.jar</value>
+            <value>tomcat-coyote.jar</value>
+            <value>commons-collections.jar</value>
+            <value>myfaces.jar</value>
+            <value>jstl.jar</value>
+            <value>commons-digester-1.6.jar</value>
+            <value>myfaces-impl.jar</value>
+            <value>commons-beanutils.jar</value>
+            <value>myfaces-jsf-api.jar</value>
+            <value>commons-codec-1.2.jar</value>
+            <value>catalina-optional.jar</value>
+            <value>tomcat-util.jar</value>
+            <value>jasper-compiler.jar</value>
+            <value>commons-el.jar</value>
+            <value>jasper-compiler-jdt.jar</value>
+            <value>tomcat-http.jar</value>
+            <value>catalina-manager.jar</value>
+            <value>jasper-runtime.jar</value>
+            <value>tomcat55-service.jar</value>
+            <value>servlets-invoker.jar</value>
+            <value>catalina.jar</value>
+            <value>naming-resources.jar</value>
+            <value>servlets-default.jar</value>
+            <value>tomcat-ajp.jar</value>
+            <value>commons-modeler.jar</value>
+            <value>tomcat-apr.jar</value>
+            <value>servlets-webdav.jar</value>
+         </set>
+      </property>
+      <depends>AspectLibrary</depends>
+   </bean>
+   <bean name="EJBStage2Deployer" class="org.jboss.ejb3.deployers.EJBStage2Deployer">
+      <depends>AspectLibrary</depends>
+   </bean>
+   
+   <bean name="AppClientParsingDeployer" class="org.jboss.ejb3.deployers.AppClientParsingDeployer">
+      <property name="type">car</property>
+      <!-- TODO: check depends -->
+      <depends>AspectLibrary</depends>
+   </bean>
+   
+   <bean name="JBossClientParsingDeployer" class="org.jboss.ejb3.deployers.JBossClientParsingDeployer">
+      <property name="type">car</property>
+      <depends>AppClientParsingDeployer</depends>
+   </bean>
+   
+   <bean name="AppClientScanningDeployer" class="org.jboss.ejb3.deployers.AppClientScanningDeployer">
+      <depends>JBossClientParsingDeployer</depends>
+   </bean>
+   
+   <bean name="Ejb3ClientDeployer" class="org.jboss.ejb3.deployers.Ejb3ClientDeployer">
+      <property name="type">car</property>
+      <property name="kernel"><inject bean="jboss.kernel:service=Kernel"/></property>
+      <property name="mbeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property>
+      <!-- TODO: check depends -->
+      <depends>AspectLibrary</depends>
+      <depends>AppClientScanningDeployer</depends>
+   </bean>
+   
+   <!-- EJB3 Cache Factory Registry -->
+   <bean name="EJB3CacheFactoryRegistry" class="org.jboss.ejb3.cache.CacheFactoryRegistry">
+      <property name="factories">
+         <!-- Define each of the registered factories -->
+         <map class="java.util.HashMap" keyClass="java.lang.String"
+            valueClass="java.lang.Class">
+            <!-- NoPassivationCache -->
+            <entry>
+               <key>NoPassivationCache</key>
+               <value>org.jboss.ejb3.cache.NoPassivationCacheFactory</value>
+            </entry>
+            <!-- SimpleStatefulCache -->
+            <entry>
+               <key>SimpleStatefulCache</key>
+               <value>org.jboss.ejb3.cache.simple.SimpleStatefulCacheFactory</value>
+            </entry>
+            <!-- StatefulTreeCache -->
+            <entry>
+               <key>StatefulTreeCache</key>
+               <value>org.jboss.ejb3.cache.tree.StatefulTreeCacheFactory</value>
+            </entry>
+         </map>
+      </property>
+   </bean>
+   
+   <!-- EJB3 Pool Factory Registry -->
+   <bean name="EJB3PoolFactoryRegistry" class="org.jboss.ejb3.pool.PoolFactoryRegistry">
+      <property name="factories">
+         <!-- Define each of the registered factories -->
+         <map class="java.util.HashMap" keyClass="java.lang.String"
+            valueClass="java.lang.Class">
+            <!-- ThreadlocalPool -->
+            <entry>
+               <key>ThreadlocalPool</key>
+               <value>org.jboss.ejb3.pool.ThreadlocalPoolFactory</value>
+            </entry>
+            <!-- StrictMaxPool -->
+            <entry>
+               <key>StrictMaxPool</key>
+               <value>org.jboss.ejb3.pool.StrictMaxPoolFactory</value>
+            </entry>
+         </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>   
+            <!-- Custom Factory -->
+            <entry>
+               <key>CustomFactory</key>
+               <value>org.jboss.ejb3.test.statefulproxyfactoryoverride.StatefulRemoteProxyFactory</value>
+            </entry>                     
+         </map>
+      </property>
+   </bean>
+   
+   <!-- EJB3 Persistence Manager Factory Registry -->
+   <bean name="EJB3PersistenceManagerFactoryRegistry" class="org.jboss.ejb3.cache.persistence.PersistenceManagerFactoryRegistry">
+      <property name="factories">
+         <!-- Define each of the registered factories -->
+         <map class="java.util.HashMap" keyClass="java.lang.String"
+            valueClass="java.lang.Class">
+            <!-- StatefulSessionFilePersistenceManager -->
+            <entry>
+               <key>StatefulSessionFilePersistenceManager</key>
+               <value>org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManagerFactory</value>
+            </entry>
+         </map>
+      </property>
+   </bean>
+   
+   <bean name="JNDIKernelRegistryPlugin" class="org.jboss.ejb3.kernel.JNDIKernelRegistryPlugin"/>
+   
+   <!-- Persistence Unit deployers -->
+   <bean name="PersistenceUnitParsingDeployer" class="org.jboss.ejb3.deployers.PersistenceUnitParsingDeployer">
+      <property name="type">car</property>
+   </bean>
+   
+</deployment>

Modified: trunk/ejb3/src/test/org/jboss/ejb3/test/stateful/unit/RemoteUnitTestCase.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/stateful/unit/RemoteUnitTestCase.java	2007-12-12 20:48:27 UTC (rev 68201)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/stateful/unit/RemoteUnitTestCase.java	2007-12-12 21:01:31 UTC (rev 68202)
@@ -172,7 +172,7 @@
       }
    }
    
-   public void testSmallCache() throws Exception
+   public void atestSmallCache() throws Exception
    {
       ConcurrentInvocation[] threads = new ConcurrentInvocation[5];
       for (int i = 0; i < 5; i++) threads[i] = new ConcurrentInvocation(i);
@@ -189,7 +189,7 @@
    
    
 
-   public void testStatefulSynchronization() throws Exception
+   public void atestStatefulSynchronization() throws Exception
    {
       SecurityAssociation.setPrincipal(new SimplePrincipal("somebody"));
       SecurityAssociation.setCredential("password".toCharArray());
@@ -199,7 +199,7 @@
 
    }
    
-   public void testEJBObject() throws Exception
+   public void atestEJBObject() throws Exception
    {
       SecurityAssociation.setPrincipal(new SimplePrincipal("somebody"));
       SecurityAssociation.setCredential("password".toCharArray());
@@ -212,7 +212,7 @@
       assertNotNull(stateful);
    }
    
-   public void testStatefulTx() throws Exception
+   public void atestStatefulTx() throws Exception
    {
       SecurityAssociation.setPrincipal(new SimplePrincipal("somebody"));
       SecurityAssociation.setCredential("password".toCharArray());
@@ -237,7 +237,7 @@
       }
    }
    
-   public void testTemplateInterfaceTx() throws Exception
+   public void atestTemplateInterfaceTx() throws Exception
    {
       SecurityAssociation.setPrincipal(new SimplePrincipal("somebody"));
       SecurityAssociation.setCredential("password".toCharArray());
@@ -255,7 +255,7 @@
       }
    }
    
-   public void testLocalSFSB() throws Exception
+   public void atestLocalSFSB() throws Exception
    {
       SecurityAssociation.setPrincipal(new SimplePrincipal("somebody"));
       SecurityAssociation.setCredential("password".toCharArray());
@@ -275,7 +275,7 @@
       }
    }
    
-   public void testNotSerialableSFSB() throws Exception
+   public void atestNotSerialableSFSB() throws Exception
    {
       SecurityAssociation.setPrincipal(new SimplePrincipal("somebody"));
       SecurityAssociation.setCredential("password".toCharArray());
@@ -287,7 +287,7 @@
       assertEquals("state", state);
    }
    
-   public void testSFSBInit() throws Exception
+   public void atestSFSBInit() throws Exception
    {
       SecurityAssociation.setPrincipal(new SimplePrincipal("somebody"));
       SecurityAssociation.setCredential("password".toCharArray());
@@ -301,7 +301,7 @@
       assertEquals("Extended_init", s);
    }
    
-   public void testStackTrace() throws Exception
+   public void atestStackTrace() throws Exception
    {
       SecurityAssociation.setPrincipal(new SimplePrincipal("somebody"));
       SecurityAssociation.setCredential("password".toCharArray());
@@ -321,7 +321,7 @@
       }
    }
    
-   public void testExceptionCase() throws Exception
+   public void atestExceptionCase() throws Exception
    {
       SecurityAssociation.setPrincipal(new SimplePrincipal("somebody"));
       SecurityAssociation.setCredential("password".toCharArray());
@@ -342,27 +342,18 @@
       }
    }
    
-   public void testRemoteBindingProxyFactory() throws Exception
+   public void atestRemoteBindingInterceptorStack() throws Exception
    {
       SecurityAssociation.setPrincipal(new SimplePrincipal("somebody"));
       SecurityAssociation.setCredential("password".toCharArray());
       
-      ProxyFactoryInterface stateful = (ProxyFactoryInterface)getInitialContext().lookup("Stateful");
-      assertNotNull(stateful);
-   }
-   
-   public void testRemoteBindingInterceptorStack() throws Exception
-   {
-      SecurityAssociation.setPrincipal(new SimplePrincipal("somebody"));
-      SecurityAssociation.setCredential("password".toCharArray());
-      
       Stateful stateful = (Stateful)getInitialContext().lookup("Stateful");
       assertNotNull(stateful);
       assertFalse(stateful.interceptorAccessed());
       assertTrue(RemoteBindingInterceptor.accessed);
    }
 
-   public void testUninstantiatedPassivation() throws Exception
+   public void atestUninstantiatedPassivation() throws Exception
    {
       SecurityAssociation.setPrincipal(new SimplePrincipal("somebody"));
       SecurityAssociation.setCredential("password".toCharArray());
@@ -379,7 +370,7 @@
       stateful.testStateful();
    }
    
-   public void testExtendedPersistencePassivation() throws Exception
+   public void atestExtendedPersistencePassivation() throws Exception
    {
       EntityFacade stateful = (EntityFacade)getInitialContext().lookup("EntityFacadeBean/remote");
       Entity entity = null;
@@ -433,7 +424,7 @@
       System.out.println("maxConnectionsInUseCount \n" + maxConnectionsInUseCount); 
    }
    
-   public void testTimeoutRemoval() throws Exception
+   public void atestTimeoutRemoval() throws Exception
    {
       StatefulTimeout sfsb = (StatefulTimeout)getInitialContext().lookup("StatefulTimeoutBean/remote");
       sfsb.test();
@@ -460,7 +451,7 @@
       }
    }
    
-   public void testClusteredTimeoutRemoval() throws Exception
+   public void atestClusteredTimeoutRemoval() throws Exception
    {
       StatefulTimeout sfsb = (StatefulTimeout)getInitialContext().lookup("StatefulClusteredTimeoutBean/remote");
       sfsb.test();
@@ -487,7 +478,7 @@
       }
    }
    
-   public void testConcurrentClusteredTimeoutRemoval() throws Exception
+   public void atestConcurrentClusteredTimeoutRemoval() throws Exception
    {
       int numThreads = 100;
       ConcurrentStatefulTimeoutClient[] clients = new ConcurrentStatefulTimeoutClient[numThreads];
@@ -525,7 +516,7 @@
       assertEquals(0, size);
    }
 
-   public void testPassivation() throws Exception
+   public void atestPassivation() throws Exception
    {
       SecurityAssociation.setPrincipal(new SimplePrincipal("somebody"));
       SecurityAssociation.setCredential("password".toCharArray());
@@ -566,7 +557,7 @@
       service.testInjection();
    }
    
-   public void testClusteredPassivation() throws Exception
+   public void atestClusteredPassivation() throws Exception
    {
       SecurityAssociation.setPrincipal(new SimplePrincipal("somebody"));
       SecurityAssociation.setCredential("password".toCharArray());
@@ -608,7 +599,7 @@
    }
 
    
-   public void testRemove() throws Exception
+   public void atestRemove() throws Exception
    {
       SecurityAssociation.setPrincipal(new SimplePrincipal("somebody"));
       SecurityAssociation.setCredential("password".toCharArray());
@@ -630,14 +621,14 @@
       }
    }
 
-   public void testRemoveWithRollback() throws Exception
+   public void atestRemoveWithRollback() throws Exception
    {
       Tester test = (Tester) getInitialContext().lookup("TesterBean/remote");
       test.testRollback1();
       test.testRollback2();
    }
    
-   public void testConcurrentAccess() throws Exception
+   public void atestConcurrentAccess() throws Exception
    {
       ConcurrentStateful stateful = (ConcurrentStateful) new InitialContext().lookup("ConcurrentStateful");
       stateful.getState();
@@ -686,7 +677,7 @@
       assertTrue(wasConcurrentException);
    }
    
-   public void testOverrideConcurrentAccess() throws Exception
+   public void atestOverrideConcurrentAccess() throws Exception
    {
       ConcurrentStateful stateful = (ConcurrentStateful) new InitialContext().lookup("OverrideConcurrentStateful");
       stateful.getState();
@@ -714,7 +705,7 @@
       assertTrue(wasConcurrentException);
    }
    
-   public void testJmxName() throws Exception
+   public void atestJmxName() throws Exception
    {
       ObjectName deployment = new ObjectName("test.ejb3:name=Bill,service=EJB3");
 
@@ -723,7 +714,7 @@
       kernel.invoke(deployment, "start", new Object[0], new String[0]);
    }
    
-   public void testDestroyException() throws Exception
+   public void atestDestroyException() throws Exception
    {
       EntityFacade stateful = (EntityFacade)getInitialContext().lookup("EntityFacadeBean/remote");
       assertNotNull(stateful);
@@ -765,7 +756,7 @@
       */
    }
       
-   public void testDestroyExceptionWithTx() throws Exception
+   public void atestDestroyExceptionWithTx() throws Exception
    {
       EntityFacade stateful = (EntityFacade)getInitialContext().lookup("EntityFacadeBean/remote");
       assertNotNull(stateful);

Added: trunk/ejb3/src/test/org/jboss/ejb3/test/statefulproxyfactoryoverride/ProxyFactoryInterface.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/statefulproxyfactoryoverride/ProxyFactoryInterface.java	                        (rev 0)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/statefulproxyfactoryoverride/ProxyFactoryInterface.java	2007-12-12 21:01:31 UTC (rev 68202)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.test.statefulproxyfactoryoverride;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ */
+public interface ProxyFactoryInterface
+{
+   String method();
+
+}

Added: trunk/ejb3/src/test/org/jboss/ejb3/test/statefulproxyfactoryoverride/StatefulBean.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/statefulproxyfactoryoverride/StatefulBean.java	                        (rev 0)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/statefulproxyfactoryoverride/StatefulBean.java	2007-12-12 21:01:31 UTC (rev 68202)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.test.statefulproxyfactoryoverride;
+
+import javax.ejb.Remote;
+import javax.ejb.Stateful;
+import org.jboss.ejb3.annotation.RemoteBinding;
+import org.jboss.logging.Logger;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ */
+ at Stateful
+ at Remote(StatefulRemote.class)
+ at RemoteBinding(jndiBinding = "Stateful",
+               factory = "CustomFactory")
+public class StatefulBean implements StatefulRemote
+{
+   private static final Logger log = Logger.getLogger(StatefulBean.class);
+
+   public String method() throws Exception
+   {
+      return "Yay!!";
+   }
+}

Added: trunk/ejb3/src/test/org/jboss/ejb3/test/statefulproxyfactoryoverride/StatefulRemote.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/statefulproxyfactoryoverride/StatefulRemote.java	                        (rev 0)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/statefulproxyfactoryoverride/StatefulRemote.java	2007-12-12 21:01:31 UTC (rev 68202)
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.test.statefulproxyfactoryoverride;
+
+
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ */
+public interface StatefulRemote 
+{
+
+}

Added: trunk/ejb3/src/test/org/jboss/ejb3/test/statefulproxyfactoryoverride/StatefulRemoteProxyFactory.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/statefulproxyfactoryoverride/StatefulRemoteProxyFactory.java	                        (rev 0)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/statefulproxyfactoryoverride/StatefulRemoteProxyFactory.java	2007-12-12 21:01:31 UTC (rev 68202)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.test.statefulproxyfactoryoverride;
+
+import org.jboss.ejb3.annotation.RemoteBinding;
+import org.jboss.ejb3.session.SessionContainer;
+import org.jboss.logging.Logger;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version $Revision: 67628 $
+ */
+public class StatefulRemoteProxyFactory extends org.jboss.ejb3.stateful.StatefulRemoteProxyFactory
+{
+   @SuppressWarnings("unused")
+   private static final Logger log = Logger.getLogger(StatefulRemoteProxyFactory.class);
+   
+   public StatefulRemoteProxyFactory(SessionContainer container, RemoteBinding binding)
+   {
+      super(container, binding);
+   }
+
+   protected Class<?>[] getInterfaces()
+   {
+      Class[] remoteInterfaces = super.getInterfaces();
+
+      Class[] interfaces = new Class[remoteInterfaces.length + 1];
+
+      System.arraycopy(remoteInterfaces, 0, interfaces, 0, remoteInterfaces.length);
+      interfaces[remoteInterfaces.length] = org.jboss.ejb3.test.statefulproxyfactoryoverride.ProxyFactoryInterface.class;
+
+      return interfaces;
+   }
+}

Added: trunk/ejb3/src/test/org/jboss/ejb3/test/statefulproxyfactoryoverride/unit/RemoteUnitTestCase.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/statefulproxyfactoryoverride/unit/RemoteUnitTestCase.java	                        (rev 0)
+++ trunk/ejb3/src/test/org/jboss/ejb3/test/statefulproxyfactoryoverride/unit/RemoteUnitTestCase.java	2007-12-12 21:01:31 UTC (rev 68202)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.test.statefulproxyfactoryoverride.unit;
+
+import junit.framework.Test;
+
+import org.jboss.ejb3.test.statefulproxyfactoryoverride.ProxyFactoryInterface;
+
+import org.jboss.test.JBossTestCase;
+
+/**
+ * Sample client for the jboss container.
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ */
+
+public class RemoteUnitTestCase
+extends JBossTestCase
+{
+   public RemoteUnitTestCase(String name)
+   {
+      super(name);
+   }
+   
+   public void testRemoteBindingProxyFactory() throws Exception
+   {
+      ProxyFactoryInterface stateful = (ProxyFactoryInterface)getInitialContext().lookup("Stateful");
+      assertNotNull(stateful);
+      stateful.method();
+   }
+
+   public static Test suite() throws Exception
+   {
+      return getDeploySetup(RemoteUnitTestCase.class, "statefulproxyfactoryoverride-test.jar");
+   }
+
+}




More information about the jboss-cvs-commits mailing list