[jboss-cvs] JBossAS SVN: r71493 - in branches/InjectionPrototype/testsuite: src/main/org/jboss/test/refs and 4 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Mar 31 14:04:32 EDT 2008


Author: scott.stark at jboss.org
Date: 2008-03-31 14:04:32 -0400 (Mon, 31 Mar 2008)
New Revision: 71493

Added:
   branches/InjectionPrototype/testsuite/src/main/org/jboss/test/refs/common/
   branches/InjectionPrototype/testsuite/src/main/org/jboss/test/refs/ejblink/
   branches/InjectionPrototype/testsuite/src/main/org/jboss/test/refs/test/CircularRefResolutionUnitTestCase.java
   branches/InjectionPrototype/testsuite/src/resources/refs/ejblink/one/ejb-jar.xml
   branches/InjectionPrototype/testsuite/src/resources/refs/ejblink/one/jboss.xml
   branches/InjectionPrototype/testsuite/src/resources/refs/ejblink/two/
   branches/InjectionPrototype/testsuite/src/resources/refs/ejblink/two/ejb-jar.xml
   branches/InjectionPrototype/testsuite/src/resources/refs/ejblink/two/jboss.xml
Removed:
   branches/InjectionPrototype/testsuite/src/resources/refs/ejblink/one_ejb.xml
   branches/InjectionPrototype/testsuite/src/resources/refs/ejblink/one_jboss.xml
   branches/InjectionPrototype/testsuite/src/resources/refs/ejblink/two_ejb.xml
   branches/InjectionPrototype/testsuite/src/resources/refs/ejblink/two_jboss.xml
Modified:
   branches/InjectionPrototype/testsuite/imports/sections/refs.xml
Log:
Update the jar descriptor names


Modified: branches/InjectionPrototype/testsuite/imports/sections/refs.xml
===================================================================
--- branches/InjectionPrototype/testsuite/imports/sections/refs.xml	2008-03-31 18:00:27 UTC (rev 71492)
+++ branches/InjectionPrototype/testsuite/imports/sections/refs.xml	2008-03-31 18:04:32 UTC (rev 71493)
@@ -1,48 +1,78 @@
-<project name="tests-refs-jars"> 
-  <target name="_jars-refs">
-      <mkdir dir="${build.lib}"/>
+<project name="tests-refs-jars">
+	<target name="_jars-refs">
+		<mkdir dir="${build.lib}" />
 
-  		<jar destfile="${build.lib}/refs-client.jar">
-  	    <manifest>
-  	        <attribute name="Main-Class" value="org.jboss.test.refs.client.Client"/>
-  	    </manifest>
-  	    <!--
+		<jar destfile="${build.lib}/refs-client.jar">
+			<manifest>
+				<attribute name="Main-Class" value="org.jboss.test.refs.client.Client" />
+			</manifest>
+			<!--
   		 <metainf dir="${build.resources}/refs">
          <include name="jboss-client.xml"/>
   		 </metainf>
   		 -->
-  			<fileset dir="${build.classes}">
-            <include name="org/jboss/test/refs/client/**"/>
-  			</fileset>
-  		</jar>
-  		<!-- A collection of ejb3 beans -->
+			<fileset dir="${build.classes}">
+				<include name="org/jboss/test/refs/client/**" />
+			</fileset>
+		</jar>
+		<!-- A collection of ejb3 beans -->
 		<jar destfile="${build.lib}/refs-ejb.jar">
-         <fileset dir="${build.classes}">
-            <include name="org/jboss/test/refs/ejbs/**"/>
-         </fileset>
+			<fileset dir="${build.classes}">
+				<include name="org/jboss/test/refs/ejbs/**" />
+			</fileset>
 		</jar>
 		<!-- A collection of ejb3 beans referencing refs-ejb.jar beans -->
 		<jar destfile="${build.lib}/refs-ejb2.jar">
-	      <fileset dir="${build.classes}">
-	         <include name="org/jboss/test/refs/ejbs2/**"/>
-	      </fileset>
+			<fileset dir="${build.classes}">
+				<include name="org/jboss/test/refs/ejbs2/**" />
+			</fileset>
 		</jar>
 		<!-- A collection of ejb2.1 beans with inter-jar refs -->
 		<jar destfile="${build.lib}/refs-ejb2x.jar">
-   	   <metainf dir="${build.resources}/refs/ejb2x">
-	        <include name="*.xml"/>
-	  		</metainf>
-	      <fileset dir="${build.classes}">
-	         <include name="org/jboss/test/refs/ejbs2x/**"/>
-	      </fileset>
+			<metainf dir="${build.resources}/refs/ejb2x">
+				<include name="*.xml" />
+			</metainf>
+			<fileset dir="${build.classes}">
+				<include name="org/jboss/test/refs/ejbs2x/**" />
+			</fileset>
 		</jar>
-      <jar destfile="${build.lib}/refs.ear">
-         <fileset dir="${build.lib}">
-            <include name="refs-client.jar" />
-            <include name="refs-ejb.jar" />
-            <include name="refs-ejb2.jar" />
-            <include name="refs-ejb2x.jar" />
-         </fileset>
-      </jar> 
-  </target> 
+		<jar destfile="${build.lib}/refs.ear">
+			<fileset dir="${build.lib}">
+				<include name="refs-client.jar" />
+				<include name="refs-ejb.jar" />
+				<include name="refs-ejb2.jar" />
+				<include name="refs-ejb2x.jar" />
+			</fileset>
+		</jar>
+
+		<!-- refs-one-ejb.jar -->
+		<jar destfile="${build.lib}/refs-one-ejb.jar">
+			<metainf dir="${build.resources}/refs/ejblink/one">
+				<include name="*.xml" />
+			</metainf>
+			<fileset dir="${build.classes}">
+				<include name="org/jboss/test/refs/common/**" />
+				<include name="org/jboss/test/refs/ejblink/EjbLink1Bean*" />
+			</fileset>
+		</jar>
+		<!-- refs-two-ejb.jar -->
+		<jar destfile="${build.lib}/refs-two-ejb.jar">
+			<metainf dir="${build.resources}/refs/ejblink/two">
+				<include name="*.xml" />
+			</metainf>
+			<fileset dir="${build.classes}">
+				<include name="org/jboss/test/refs/common/**" />
+				<include name="org/jboss/test/refs/ejblink/EjbLink2Bean*" />
+				<include name="org/jboss/test/refs/ejblink/EjbLink3Bean*" />
+			</fileset>
+		</jar>
+		<!-- refs-ejb3-ejblink.ear -->
+		<jar destfile="${build.lib}/refs-ejb3-ejblink.ear">
+			<fileset dir="${build.lib}">
+				<include name="refs-one-ejb.jar" />
+				<include name="refs-two-ejb.jar" />
+				<include name="refs-ejblink-client.jar" />
+			</fileset>
+		</jar>
+	</target>
 </project>

Copied: branches/InjectionPrototype/testsuite/src/main/org/jboss/test/refs/common (from rev 71410, trunk/testsuite/src/main/org/jboss/test/refs/common)

Copied: branches/InjectionPrototype/testsuite/src/main/org/jboss/test/refs/ejblink (from rev 71410, trunk/testsuite/src/main/org/jboss/test/refs/ejblink)

Copied: branches/InjectionPrototype/testsuite/src/main/org/jboss/test/refs/test/CircularRefResolutionUnitTestCase.java (from rev 71410, trunk/testsuite/src/main/org/jboss/test/refs/test/CircularRefResolutionUnitTestCase.java)
===================================================================
--- branches/InjectionPrototype/testsuite/src/main/org/jboss/test/refs/test/CircularRefResolutionUnitTestCase.java	                        (rev 0)
+++ branches/InjectionPrototype/testsuite/src/main/org/jboss/test/refs/test/CircularRefResolutionUnitTestCase.java	2008-03-31 18:04:32 UTC (rev 71493)
@@ -0,0 +1,109 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt 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.test.refs.test;
+
+import java.util.Date;
+
+import javax.ejb.Remote;
+import javax.ejb.Stateless;
+import javax.naming.InitialContext;
+
+import junit.framework.Test;
+
+import org.jboss.ejb3.client.ClientLauncher;
+import org.jboss.test.JBossTestCase;
+import org.jboss.test.refs.client.Client;
+import org.jboss.test.refs.common.EjbLinkIF;
+import org.jboss.test.refs.ejbs2.StatelessTest;
+
+/**
+ * Tests of reference resolution. The ear consists of:
+ * 
+   refs-ejb3-ejblink.ear
+    + refs-ejblink-client.jar
+      - @EJB(name = "ejb/StatefulBean", beanInterface = StatefulIF.class)
+        -> StatefulBean
+    + refs-one-ejb.jar
+      - EjbLink1Bean
+         + @Stateless(name = "EjbLink1Bean")
+         + @Remote( { EjbLinkIF.class })
+         + ejb-ref
+           - ejb-name=ejb/EjbLink2Bean
+           - ejb-link=two_ejb.jar#EjbLink2Bean
+    + two_ejb.jar
+       - EjbLink2Bean
+         + @Stateless(name = "EjbLink2Bean")
+         + @Remote( { EjbLinkIF.class })
+         + ejb-ref
+            - ejb-ref-name=ejb/EjbLink1Bean
+            - ejb-link=one_ejb.jar#EjbLink1Bean
+         + ejb-local-ref
+            - ejb-ref-name=ejb/EjbLink3Bean
+            - ejb-link=EjbLink3Bean         
+       - EjbLink3Bean
+         + @Stateless(name = "EjbLink3Bean")
+
+ * @author Scott.Stark at jboss.org
+ * @version $Revision$
+ */
+public class CircularRefResolutionUnitTestCase
+   extends JBossTestCase
+{
+   public static Test suite() throws Exception
+   {
+      Test t1 = getDeploySetup(RefResolutionUnitTestCase.class, "refs.ear");
+      return t1;
+   }
+
+   public CircularRefResolutionUnitTestCase(String name)
+   {
+      super(name);
+   }
+
+   public void testSessionEJBRefs()
+      throws Exception
+   {
+      InitialContext ctx = getInitialContext();
+      Object ref = ctx.lookup("refs/StatelessBean2/remote");
+      StatelessTest test = (StatelessTest) ref;
+      test.validate();
+   }
+
+   /**
+    * 
+    * @throws Throwable
+    */
+   public void testClientSessionRefByInterface()
+      throws Throwable
+   {
+      String mainClassName = Client.class.getName();
+      // must match JNDI name in jboss-client.xml or display-name in application-client.xml
+      String applicationClientName = "refs_client";
+      String name = new Date().toString();
+      String args[] = { name };
+      
+      ClientLauncher launcher = new ClientLauncher();
+      launcher.launch(mainClassName, applicationClientName, args);
+      assertNotNull(Client.getStatefulBean());
+      assertNotNull(Client.getStatelessBean());
+   }
+}

Added: branches/InjectionPrototype/testsuite/src/resources/refs/ejblink/one/ejb-jar.xml
===================================================================
--- branches/InjectionPrototype/testsuite/src/resources/refs/ejblink/one/ejb-jar.xml	                        (rev 0)
+++ branches/InjectionPrototype/testsuite/src/resources/refs/ejblink/one/ejb-jar.xml	2008-03-31 18:04:32 UTC (rev 71493)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    version="3.0"
+    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
+    <enterprise-beans>
+        <session>
+            <ejb-name>EjbLink1Bean</ejb-name>
+            <ejb-class>org.jboss.test.refs.ejblink.EjbLink1Bean</ejb-class>
+            
+            <ejb-ref>
+                <ejb-ref-name>ejb/EjbLink2Bean</ejb-ref-name>
+                <ejb-ref-type>Session</ejb-ref-type>
+                <remote>org.jboss.test.refs.common.EjbLinkIF</remote>
+                <ejb-link>two_ejb.jar#EjbLink2Bean</ejb-link>
+            </ejb-ref>
+
+        </session>
+    </enterprise-beans>
+</ejb-jar>

Added: branches/InjectionPrototype/testsuite/src/resources/refs/ejblink/one/jboss.xml
===================================================================
--- branches/InjectionPrototype/testsuite/src/resources/refs/ejblink/one/jboss.xml	                        (rev 0)
+++ branches/InjectionPrototype/testsuite/src/resources/refs/ejblink/one/jboss.xml	2008-03-31 18:04:32 UTC (rev 71493)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jboss xmlns="http://www.jboss.com/xml/ns/javaee"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss_5_0.xsd"
+    version="3.0">
+    <enterprise-beans>
+        <ejb>
+            <ejb-name>EjbLink1Bean</ejb-name>
+            <jndi-name>ejb3_stateless_ejblink_one_EjbLink1Bean</jndi-name>
+            <ejb-ref>
+                <ejb-ref-name>ejb/EjbLink2Bean</ejb-ref-name>
+            </ejb-ref>
+        </ejb>
+        
+    </enterprise-beans>
+</jboss>

Deleted: branches/InjectionPrototype/testsuite/src/resources/refs/ejblink/one_ejb.xml
===================================================================
--- branches/InjectionPrototype/testsuite/src/resources/refs/ejblink/one_ejb.xml	2008-03-31 18:00:27 UTC (rev 71492)
+++ branches/InjectionPrototype/testsuite/src/resources/refs/ejblink/one_ejb.xml	2008-03-31 18:04:32 UTC (rev 71493)
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    version="3.0"
-    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
-    <enterprise-beans>
-        <session>
-            <ejb-name>EjbLink1Bean</ejb-name>
-            <ejb-class>org.jboss.test.refs.ejblink.EjbLink1Bean</ejb-class>
-            
-            <ejb-ref>
-                <ejb-ref-name>ejb/EjbLink2Bean</ejb-ref-name>
-                <ejb-ref-type>Session</ejb-ref-type>
-                <remote>org.jboss.test.refs.common.EjbLinkIF</remote>
-                <ejb-link>two_ejb.jar#EjbLink2Bean</ejb-link>
-            </ejb-ref>
-
-        </session>
-    </enterprise-beans>
-</ejb-jar>

Deleted: branches/InjectionPrototype/testsuite/src/resources/refs/ejblink/one_jboss.xml
===================================================================
--- branches/InjectionPrototype/testsuite/src/resources/refs/ejblink/one_jboss.xml	2008-03-31 18:00:27 UTC (rev 71492)
+++ branches/InjectionPrototype/testsuite/src/resources/refs/ejblink/one_jboss.xml	2008-03-31 18:04:32 UTC (rev 71493)
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<jboss xmlns="http://www.jboss.com/xml/ns/javaee"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://www.jboss.org/j2ee/schema
-    http://www.jboss.org/j2ee/schema/jboss_5_0.xsd"
-    version="5.0">
-    <enterprise-beans>
-        <ejb>
-            <ejb-name>EjbLink1Bean</ejb-name>
-            <jndi-name>ejb3_stateless_ejblink_one_EjbLink1Bean</jndi-name>
-            <ejb-ref>
-                <ejb-ref-name>ejb/EjbLink2Bean</ejb-ref-name>
-            </ejb-ref>
-        </ejb>
-        
-    </enterprise-beans>
-</jboss>

Added: branches/InjectionPrototype/testsuite/src/resources/refs/ejblink/two/ejb-jar.xml
===================================================================
--- branches/InjectionPrototype/testsuite/src/resources/refs/ejblink/two/ejb-jar.xml	                        (rev 0)
+++ branches/InjectionPrototype/testsuite/src/resources/refs/ejblink/two/ejb-jar.xml	2008-03-31 18:04:32 UTC (rev 71493)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    version="3.0"
+    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
+    <enterprise-beans>
+        <session>
+            <ejb-name>EjbLink2Bean</ejb-name>
+            <ejb-class>org.jboss.test.refs.ejblink.EjbLink2Bean</ejb-class>
+            
+            <ejb-ref>
+                <ejb-ref-name>ejb/EjbLink1Bean</ejb-ref-name>
+                <ejb-ref-type>Session</ejb-ref-type>
+                <remote>org.jboss.test.refs.common.EjbLinkIF</remote>
+                <ejb-link>one_ejb.jar#EjbLink1Bean</ejb-link>
+            </ejb-ref>
+            
+            <ejb-local-ref>
+                <ejb-ref-name>ejb/EjbLink3Bean</ejb-ref-name>
+                <ejb-ref-type>Session</ejb-ref-type>
+                <local>org.jboss.test.refs.common.EjbLinkIF</local>
+                <ejb-link>EjbLink3Bean</ejb-link>
+            </ejb-local-ref>
+            
+        </session>
+    </enterprise-beans>
+</ejb-jar>

Added: branches/InjectionPrototype/testsuite/src/resources/refs/ejblink/two/jboss.xml
===================================================================
--- branches/InjectionPrototype/testsuite/src/resources/refs/ejblink/two/jboss.xml	                        (rev 0)
+++ branches/InjectionPrototype/testsuite/src/resources/refs/ejblink/two/jboss.xml	2008-03-31 18:04:32 UTC (rev 71493)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jboss xmlns="http://www.jboss.com/xml/ns/javaee"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss_5_0.xsd"
+    version="3.0">
+    <enterprise-beans>
+        <ejb>
+            <ejb-name>EjbLink2Bean</ejb-name>
+            <jndi-name>ejb3_stateless_ejblink_one_EjbLink2Bean</jndi-name>
+            <ejb-ref>
+                <ejb-ref-name>ejb/EjbLink1Bean</ejb-ref-name>
+            </ejb-ref>
+            <ejb-ref>
+                <ejb-ref-name>ejb/EjbLink3Bean</ejb-ref-name>
+            </ejb-ref>
+        </ejb>
+        
+    </enterprise-beans>
+</jboss>

Deleted: branches/InjectionPrototype/testsuite/src/resources/refs/ejblink/two_ejb.xml
===================================================================
--- branches/InjectionPrototype/testsuite/src/resources/refs/ejblink/two_ejb.xml	2008-03-31 18:00:27 UTC (rev 71492)
+++ branches/InjectionPrototype/testsuite/src/resources/refs/ejblink/two_ejb.xml	2008-03-31 18:04:32 UTC (rev 71493)
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    version="3.0"
-    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
-    <enterprise-beans>
-        <session>
-            <ejb-name>EjbLink2Bean</ejb-name>
-            <ejb-class>org.jboss.test.refs.ejblink.EjbLink2Bean</ejb-class>
-            
-            <ejb-ref>
-                <ejb-ref-name>ejb/EjbLink1Bean</ejb-ref-name>
-                <ejb-ref-type>Session</ejb-ref-type>
-                <remote>org.jboss.test.refs.common.EjbLinkIF</remote>
-                <ejb-link>one_ejb.jar#EjbLink1Bean</ejb-link>
-            </ejb-ref>
-            
-            <ejb-local-ref>
-                <ejb-ref-name>ejb/EjbLink3Bean</ejb-ref-name>
-                <ejb-ref-type>Session</ejb-ref-type>
-                <local>org.jboss.test.refs.common.EjbLinkIF</local>
-                <ejb-link>EjbLink3Bean</ejb-link>
-            </ejb-local-ref>
-            
-        </session>
-    </enterprise-beans>
-</ejb-jar>

Deleted: branches/InjectionPrototype/testsuite/src/resources/refs/ejblink/two_jboss.xml
===================================================================
--- branches/InjectionPrototype/testsuite/src/resources/refs/ejblink/two_jboss.xml	2008-03-31 18:00:27 UTC (rev 71492)
+++ branches/InjectionPrototype/testsuite/src/resources/refs/ejblink/two_jboss.xml	2008-03-31 18:04:32 UTC (rev 71493)
@@ -1,19 +0,0 @@
-<jboss xmlns="http://www.jboss.com/xml/ns/javaee"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://www.jboss.org/j2ee/schema
-    http://www.jboss.org/j2ee/schema/jboss_5_0.xsd"
-    version="5.0">
-    <enterprise-beans>
-        <ejb>
-            <ejb-name>EjbLink2Bean</ejb-name>
-            <jndi-name>ejb3_stateless_ejblink_one_EjbLink2Bean</jndi-name>
-            <ejb-ref>
-                <ejb-ref-name>ejb/EjbLink1Bean</ejb-ref-name>
-            </ejb-ref>
-            <ejb-ref>
-                <ejb-ref-name>ejb/EjbLink3Bean</ejb-ref-name>
-            </ejb-ref>
-        </ejb>
-        
-    </enterprise-beans>
-</jboss>




More information about the jboss-cvs-commits mailing list