[jboss-cvs] JBossAS SVN: r66799 - in branches/Branch_4_2/ejb3: src/resources/test and 6 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Nov 6 17:05:34 EST 2007


Author: bdecoste
Date: 2007-11-06 17:05:34 -0500 (Tue, 06 Nov 2007)
New Revision: 66799

Added:
   branches/Branch_4_2/ejb3/src/resources/test/ejbthree1092/
   branches/Branch_4_2/ejb3/src/resources/test/ejbthree1092/META-INF/
   branches/Branch_4_2/ejb3/src/resources/test/ejbthree1092/META-INF/jboss.xml
   branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree1092/
   branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree1092/StatelessBean.java
   branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree1092/StatelessRemote.java
   branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree1092/unit/
   branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree1092/unit/StatelessTestCase.java
Removed:
   branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/timestampentity/entity/
   branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/timestampentity/unit/
Modified:
   branches/Branch_4_2/ejb3/build-test.xml
Log:
[JBAS-4938] removed proprietary code
[EJBTHREE-1092] test for load-balance-policy override

Modified: branches/Branch_4_2/ejb3/build-test.xml
===================================================================
--- branches/Branch_4_2/ejb3/build-test.xml	2007-11-06 21:51:48 UTC (rev 66798)
+++ branches/Branch_4_2/ejb3/build-test.xml	2007-11-06 22:05:34 UTC (rev 66799)
@@ -67,7 +67,7 @@
    <import file="../testsuite/imports/server-config.xml"/>
    <!-- Propagate the dist directory as a jbosstest system property -->
    <property name="ejb3.dist" value="${jboss.dist}"/>
-   <echo message="${ejb3.dist}"/>
+   <echo message="ejb3.dist = ${ejb3.dist}"/>
    <property name="jbosstest.dist" value="${ejb3.dist}"/>
 
    <property name="ejb3.jboss.jvmargs" value="-Xmx128m"/>
@@ -2282,23 +2282,6 @@
       </jar>
    </target>
    
-    <target name="timestampentity"
-      description="Builds all jar files."
-      depends="compile-classes">
-
-      <mkdir dir="${build.lib}"/>
-
-      <jar jarfile="${build.lib}/timestampentity-test.jar">
-         <fileset dir="${build.classes}">
-            <include name="org/jboss/ejb3/test/timestampentity/*.class"/>
-            <include name="org/jboss/ejb3/test/timestampentity/entity/*.class"/>
-         </fileset>
-         <fileset dir="${resources}/test/timestampentity">
-            <include name="META-INF/persistence.xml"/>
-         </fileset>
-      </jar>
-   </target>
-   
    <target name="mdbtransactions"
       description="Builds all jar files."
       depends="compile-classes">
@@ -2843,6 +2826,22 @@
 	  <copy file="${build.lib}/stateless-test.jar" tofile="${build.lib}/stateless-test.ejb3"/>
    </target>
    
+   <target name="ejbthree1092"
+      description="Builds all jar files."
+      depends="compile-classes">
+
+      <mkdir dir="${build.lib}"/>
+
+      <jar jarfile="${build.lib}/ejbthree1092-test.jar">
+         <fileset dir="${build.classes}">
+            <include name="org/jboss/ejb3/test/ejbthree1092/*.class"/>
+         </fileset>
+         <fileset dir="${resources}/test/ejbthree1092">
+            <include name="META-INF/*.xml"/>
+         </fileset>
+      </jar>
+   </target>
+   
    <target name="statelesscreation"
       description="Builds all jar files."
       depends="compile-classes">
@@ -3382,7 +3381,7 @@
 	  </copy>
    </target>
 
-   <target name="jars" depends="removedislocal, statelesscreation, defaultremotebindings, localfromremote, clusteredjms, entityoptimisticlocking, concurrentnaming, propertyreplacement, persistenceunits, invalidtxmdb, descriptortypo, libdeployment, homeinterface, timestampentity, servicexmbean, arjuna, mdbtransactions, unauthenticatedprincipal, clusteredservice, invoker, classloader, 
+   <target name="jars" depends="ejbthree1092, removedislocal, statelesscreation, defaultremotebindings, localfromremote, clusteredjms, entityoptimisticlocking, concurrentnaming, propertyreplacement, persistenceunits, invalidtxmdb, descriptortypo, libdeployment, homeinterface, servicexmbean, arjuna, mdbtransactions, unauthenticatedprincipal, clusteredservice, invoker, classloader, 
       circulardependency, jsp, timerdependency, servicedependency, servlet, stateless14, webservices, ear, ejbthree440, 
       ejbthree454, ejbthree653, ejbthree670, ejbthree712, ejbthree724, ejbthree751, ejbthree785, ejbthree786, ejbthree832, ejbthree921,
       ejbthree959, ejbthree963, ejbthree986, ejbthree994, ejbthree1023, ejbthree1025, ejbthree1057, ejbthree1062,

Added: branches/Branch_4_2/ejb3/src/resources/test/ejbthree1092/META-INF/jboss.xml
===================================================================
--- branches/Branch_4_2/ejb3/src/resources/test/ejbthree1092/META-INF/jboss.xml	                        (rev 0)
+++ branches/Branch_4_2/ejb3/src/resources/test/ejbthree1092/META-INF/jboss.xml	2007-11-06 22:05:34 UTC (rev 66799)
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<jboss
+        xmlns="http://java.sun.com/xml/ns/javaee"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+                            http://www.jboss.org/j2ee/schema/jboss_5_0.xsd"
+        version="3.0">
+   <enterprise-beans>
+      <session>
+         <ejb-name>StatelessBean</ejb-name>
+         <clustered>true</clustered>
+         <!--cluster-config>
+         	<partition-name>DefaultPartition</partition-name>
+           	<load-balance-policy>org.jboss.ha.framework.interfaces.RoundRobin</load-balance-policy>
+         </cluster-config-->
+      </session>
+   </enterprise-beans>
+</jboss>

Added: branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree1092/StatelessBean.java
===================================================================
--- branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree1092/StatelessBean.java	                        (rev 0)
+++ branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree1092/StatelessBean.java	2007-11-06 22:05:34 UTC (rev 66799)
@@ -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.ejbthree1092;
+
+import javax.ejb.Stateless;
+import javax.ejb.Remote;
+
+import org.jboss.annotation.ejb.Clustered;
+import org.jboss.ha.framework.interfaces.RandomRobin;
+import org.jboss.ha.framework.interfaces.RoundRobin;
+import org.jboss.logging.Logger;
+
+/**
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ */
+ at Stateless
+ at Remote(StatelessRemote.class)
+ at Clustered(loadBalancePolicy = RandomRobin.class)
+public class StatelessBean implements StatelessRemote
+{
+   private static final Logger log = Logger.getLogger(StatelessBean.class);
+   
+   public void test(int count)
+   {
+      log.info("****************** test " + count);
+   }
+}

Added: branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree1092/StatelessRemote.java
===================================================================
--- branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree1092/StatelessRemote.java	                        (rev 0)
+++ branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree1092/StatelessRemote.java	2007-11-06 22:05:34 UTC (rev 66799)
@@ -0,0 +1,30 @@
+/*
+ * 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.ejbthree1092;
+
+/**
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ */
+public interface StatelessRemote
+{
+   void test(int count);
+}

Added: branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree1092/unit/StatelessTestCase.java
===================================================================
--- branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree1092/unit/StatelessTestCase.java	                        (rev 0)
+++ branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree1092/unit/StatelessTestCase.java	2007-11-06 22:05:34 UTC (rev 66799)
@@ -0,0 +1,58 @@
+/*
+ * 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.ejbthree1092.unit;
+
+import org.jboss.ejb3.test.ejbthree1092.StatelessRemote;
+
+import org.jboss.logging.Logger;
+import org.jboss.test.JBossTestCase;
+import junit.framework.Test;
+
+/**
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ */
+public class StatelessTestCase extends JBossTestCase
+{
+   private static final Logger log = Logger.getLogger(StatelessTestCase.class);
+
+   public StatelessTestCase(String name)
+   {
+      super(name);
+   }
+ 
+   public void testLoadBalanceOverride() throws Exception
+   {
+      StatelessRemote stateless = (StatelessRemote) getInitialContext().lookup("StatelessBean/remote");
+      assertNotNull(stateless);
+      
+      for(int i = 0 ; i < 20 ; ++i)
+      {
+         stateless.test(i);
+         Thread.sleep(500);
+      }
+   }
+
+   public static Test suite() throws Exception
+   {
+      return getDeploySetup(StatelessTestCase.class, ""); //"ejbthree1092-test.jar");
+   }
+}
\ No newline at end of file




More information about the jboss-cvs-commits mailing list