[jboss-cvs] JBossAS SVN: r73110 - in projects/ejb3/trunk/core: src/test/java/org/jboss/ejb3/test and 12 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed May 7 11:30:33 EDT 2008


Author: alex.loubyansky at jboss.com
Date: 2008-05-07 11:30:31 -0400 (Wed, 07 May 2008)
New Revision: 73110

Added:
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/externalrefscoped/
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/externalrefscoped/First.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/externalrefscoped/FirstBean.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/externalrefscoped/Second.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/externalrefscoped/SecondBean.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/externalrefscoped/unit/
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/externalrefscoped/unit/ExternalRefScopedUnitTestCase.java
   projects/ejb3/trunk/core/src/test/resources/test/externalrefscoped/
   projects/ejb3/trunk/core/src/test/resources/test/externalrefscoped/first-ear/
   projects/ejb3/trunk/core/src/test/resources/test/externalrefscoped/first-ear/META-INF/
   projects/ejb3/trunk/core/src/test/resources/test/externalrefscoped/first-ear/META-INF/application.xml
   projects/ejb3/trunk/core/src/test/resources/test/externalrefscoped/first-ejb-jar/
   projects/ejb3/trunk/core/src/test/resources/test/externalrefscoped/first-ejb-jar/META-INF/
   projects/ejb3/trunk/core/src/test/resources/test/externalrefscoped/first-ejb-jar/META-INF/MANIFEST.MF
   projects/ejb3/trunk/core/src/test/resources/test/externalrefscoped/first-ejb-jar/META-INF/ejb-jar.xml
   projects/ejb3/trunk/core/src/test/resources/test/externalrefscoped/second-ear/
   projects/ejb3/trunk/core/src/test/resources/test/externalrefscoped/second-ear/META-INF/
   projects/ejb3/trunk/core/src/test/resources/test/externalrefscoped/second-ear/META-INF/application.xml
   projects/ejb3/trunk/core/src/test/resources/test/externalrefscoped/second-ejb-jar/
   projects/ejb3/trunk/core/src/test/resources/test/externalrefscoped/second-ejb-jar/META-INF/
   projects/ejb3/trunk/core/src/test/resources/test/externalrefscoped/second-ejb-jar/META-INF/ejb-jar.xml
   projects/ejb3/trunk/core/src/test/resources/test/externalrefscoped/second-ejb-jar/META-INF/manifest.mf
Modified:
   projects/ejb3/trunk/core/build-test.xml
Log:
EJBTHREE-862

Modified: projects/ejb3/trunk/core/build-test.xml
===================================================================
--- projects/ejb3/trunk/core/build-test.xml	2008-05-07 15:30:19 UTC (rev 73109)
+++ projects/ejb3/trunk/core/build-test.xml	2008-05-07 15:30:31 UTC (rev 73110)
@@ -4106,6 +4106,48 @@
 	      </fileset>
 	  </jar>
    </target>
+
+   <target name="externalrefscoped" description="Builds externalrefscoped jar files.">
+      <mkdir dir="${build.lib}"/>
+
+      <jar jarfile="${build.lib}/externalrefscoped-first-client-view.jar">
+         <fileset dir="${build.classes}">
+            <include name="org/jboss/ejb3/test/externalrefscoped/First.class"/>
+         </fileset>
+      </jar>
+      <jar jarfile="${build.lib}/externalrefscoped-first-ejb.jar">
+         <fileset dir="${build.classes}">
+            <include name="org/jboss/ejb3/test/externalrefscoped/FirstBean.class"/>
+         </fileset>
+         <fileset dir="${resources}/test/externalrefscoped/first-ejb-jar"/>
+      </jar>
+      <jar jarfile="${build.lib}/externalrefscoped-second-client-view.jar">
+         <fileset dir="${build.classes}">
+            <include name="org/jboss/ejb3/test/externalrefscoped/Second.class"/>
+         </fileset>
+      </jar>
+      <jar jarfile="${build.lib}/externalrefscoped-second-ejb.jar">
+         <fileset dir="${build.classes}">
+            <include name="org/jboss/ejb3/test/externalrefscoped/SecondBean.class"/>
+         </fileset>
+         <fileset dir="${resources}/test/externalrefscoped/second-ejb-jar"/>
+      </jar>
+      <jar jarfile="${build.lib}/externalrefscoped-first.ear">
+         <fileset dir="${resources}/test/externalrefscoped/first-ear"/>
+         <fileset dir="${build.lib}">
+            <include name="externalrefscoped-first-client-view.jar"/>
+            <include name="externalrefscoped-second-client-view.jar"/>
+            <include name="externalrefscoped-first-ejb.jar"/>
+         </fileset>
+      </jar>
+      <jar jarfile="${build.lib}/externalrefscoped-second.ear">
+         <fileset dir="${resources}/test/externalrefscoped/second-ear"/>
+         <fileset dir="${build.lib}">
+            <include name="externalrefscoped-second-client-view.jar"/>
+            <include name="externalrefscoped-second-ejb.jar"/>
+         </fileset>
+      </jar>
+   </target>
    
    <target name="jars" depends="statefulproxyfactoryoverride, removedislocal, statelesscreation, defaultremotebindings, localfromremote, clusteredjms, entityoptimisticlocking, concurrentnaming, propertyreplacement, persistenceunits, appclient, tck5sec, invalidtxmdb, descriptortypo, libdeployment, homeinterface, arjuna, mdbtransactions, unauthenticatedprincipal, clusteredservice, invoker, classloader,
       concurrent,
@@ -4131,7 +4173,7 @@
       timer, benchmark, entity, joininheritance, singletable, tableperclass, dependent, mdb, manytomany, regression,
       composite, composite2, entitycallback, relationships, ssl, ssladvanced, clusteredsession, strictpool, jacc,
       localcall, interceptors, interceptors2, interceptors3, iiop, clientinterceptor,
-      statelesscreation, changexml"/>
+      statelesscreation, changexml, externalrefscoped"/>
 
    <target name="test" depends="init" if="test"
       description="Execute all tests in the given test directory.">

Added: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/externalrefscoped/First.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/externalrefscoped/First.java	                        (rev 0)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/externalrefscoped/First.java	2008-05-07 15:30:31 UTC (rev 73110)
@@ -0,0 +1,35 @@
+/*
+ * 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.externalrefscoped;
+
+
+/**
+ * A FirstReferencer.
+ * 
+ * @author <a href="alex at jboss.com">Alexey Loubyansky</a>
+ * @version $Revision: 1.1 $
+ */
+
+public interface First
+{
+   void invokeSecond();
+}

Added: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/externalrefscoped/FirstBean.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/externalrefscoped/FirstBean.java	                        (rev 0)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/externalrefscoped/FirstBean.java	2008-05-07 15:30:31 UTC (rev 73110)
@@ -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.externalrefscoped;
+
+import javax.ejb.EJB;
+import javax.ejb.Remote;
+import javax.ejb.Stateless;
+
+
+/**
+ * A FirstReferencerBean.
+ * 
+ * @author <a href="alex at jboss.com">Alexey Loubyansky</a>
+ * @version $Revision: 1.1 $
+ */
+ at Stateless(mappedName="externalrefscoped/First")
+ at Remote(First.class)
+public class FirstBean implements First
+{
+   @EJB(mappedName="externalrefscoped/Second")
+   private Second second;
+   
+   public void invokeSecond()
+   {
+      second.execute();
+   }
+}

Added: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/externalrefscoped/Second.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/externalrefscoped/Second.java	                        (rev 0)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/externalrefscoped/Second.java	2008-05-07 15:30:31 UTC (rev 73110)
@@ -0,0 +1,35 @@
+/*
+ * 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.externalrefscoped;
+
+
+/**
+ * A SecondRererencer.
+ * 
+ * @author <a href="alex at jboss.com">Alexey Loubyansky</a>
+ * @version $Revision: 1.1 $
+ */
+
+public interface Second
+{
+   void execute();
+}

Added: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/externalrefscoped/SecondBean.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/externalrefscoped/SecondBean.java	                        (rev 0)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/externalrefscoped/SecondBean.java	2008-05-07 15:30:31 UTC (rev 73110)
@@ -0,0 +1,41 @@
+/*
+ * 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.externalrefscoped;
+
+import javax.ejb.Remote;
+import javax.ejb.Stateless;
+
+
+/**
+ * A SecondBean.
+ * 
+ * @author <a href="alex at jboss.com">Alexey Loubyansky</a>
+ * @version $Revision: 1.1 $
+ */
+ at Stateless(mappedName="externalrefscoped/Second")
+ at Remote(Second.class)
+public class SecondBean implements Second
+{
+   public void execute()
+   {
+   }
+}

Added: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/externalrefscoped/unit/ExternalRefScopedUnitTestCase.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/externalrefscoped/unit/ExternalRefScopedUnitTestCase.java	                        (rev 0)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/externalrefscoped/unit/ExternalRefScopedUnitTestCase.java	2008-05-07 15:30:31 UTC (rev 73110)
@@ -0,0 +1,59 @@
+/*
+ * 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.externalrefscoped.unit;
+
+import javax.naming.InitialContext;
+
+import junit.framework.Test;
+
+import org.jboss.ejb3.test.externalrefscoped.First;
+import org.jboss.test.JBossTestCase;
+
+
+/**
+ * A ExternalRefScopedUnitTestCase.
+ * 
+ * @author <a href="alex at jboss.com">Alexey Loubyansky</a>
+ * @version $Revision: 1.1 $
+ */
+public class ExternalRefScopedUnitTestCase extends JBossTestCase
+{
+   public ExternalRefScopedUnitTestCase(String arg0)
+   {
+      super(arg0);
+   }
+
+   public void testInvocation() throws Exception
+   {
+      InitialContext ic = new InitialContext();
+      First first = (First) ic.lookup("externalrefscoped/First");
+      first.invokeSecond();
+   }
+   
+   /**
+    * Setup the test suite.
+    */
+   public static Test suite() throws Exception
+   {
+      return getDeploySetup(ExternalRefScopedUnitTestCase.class, "externalrefscoped-second.ear, externalrefscoped-first.ear");
+   }
+}

Added: projects/ejb3/trunk/core/src/test/resources/test/externalrefscoped/first-ear/META-INF/application.xml
===================================================================
--- projects/ejb3/trunk/core/src/test/resources/test/externalrefscoped/first-ear/META-INF/application.xml	                        (rev 0)
+++ projects/ejb3/trunk/core/src/test/resources/test/externalrefscoped/first-ear/META-INF/application.xml	2008-05-07 15:30:31 UTC (rev 73110)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application PUBLIC
+   "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
+   "http://java.sun.com/dtd/application_1_3.dtd">
+
+<application>
+   <display-name>n'importe quoi</display-name>
+   <module>
+      <ejb>externalrefscoped-first-ejb.jar</ejb>
+   </module>
+</application>

Added: projects/ejb3/trunk/core/src/test/resources/test/externalrefscoped/first-ejb-jar/META-INF/MANIFEST.MF
===================================================================
--- projects/ejb3/trunk/core/src/test/resources/test/externalrefscoped/first-ejb-jar/META-INF/MANIFEST.MF	                        (rev 0)
+++ projects/ejb3/trunk/core/src/test/resources/test/externalrefscoped/first-ejb-jar/META-INF/MANIFEST.MF	2008-05-07 15:30:31 UTC (rev 73110)
@@ -0,0 +1 @@
+Class-Path: externalrefscoped-first-client-view.jar externalrefscoped-second-client-view.jar

Added: projects/ejb3/trunk/core/src/test/resources/test/externalrefscoped/first-ejb-jar/META-INF/ejb-jar.xml
===================================================================
--- projects/ejb3/trunk/core/src/test/resources/test/externalrefscoped/first-ejb-jar/META-INF/ejb-jar.xml	                        (rev 0)
+++ projects/ejb3/trunk/core/src/test/resources/test/externalrefscoped/first-ejb-jar/META-INF/ejb-jar.xml	2008-05-07 15:30:31 UTC (rev 73110)
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<ejb-jar
+        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://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
+        version="3.0">
+	<description>JBoss EJB3 Test</description>
+   	<display-name>Test</display-name>
+
+        <ejb-client-jar>externalrefscoped-first-client-view.jar</ejb-client-jar>
+</ejb-jar>

Added: projects/ejb3/trunk/core/src/test/resources/test/externalrefscoped/second-ear/META-INF/application.xml
===================================================================
--- projects/ejb3/trunk/core/src/test/resources/test/externalrefscoped/second-ear/META-INF/application.xml	                        (rev 0)
+++ projects/ejb3/trunk/core/src/test/resources/test/externalrefscoped/second-ear/META-INF/application.xml	2008-05-07 15:30:31 UTC (rev 73110)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE application PUBLIC
+   "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
+   "http://java.sun.com/dtd/application_1_3.dtd">
+
+<application>
+   <display-name>n'importe quoi</display-name>
+   <module>
+      <ejb>externalrefscoped-second-ejb.jar</ejb>
+   </module>
+</application>

Added: projects/ejb3/trunk/core/src/test/resources/test/externalrefscoped/second-ejb-jar/META-INF/ejb-jar.xml
===================================================================
--- projects/ejb3/trunk/core/src/test/resources/test/externalrefscoped/second-ejb-jar/META-INF/ejb-jar.xml	                        (rev 0)
+++ projects/ejb3/trunk/core/src/test/resources/test/externalrefscoped/second-ejb-jar/META-INF/ejb-jar.xml	2008-05-07 15:30:31 UTC (rev 73110)
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<ejb-jar
+        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://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
+        version="3.0">
+	<description>JBoss EJB3 Test</description>
+   	<display-name>Test</display-name>
+
+        <ejb-client-jar>externalrefscoped-second-client-view.jar</ejb-client-jar>
+</ejb-jar>

Added: projects/ejb3/trunk/core/src/test/resources/test/externalrefscoped/second-ejb-jar/META-INF/manifest.mf
===================================================================
--- projects/ejb3/trunk/core/src/test/resources/test/externalrefscoped/second-ejb-jar/META-INF/manifest.mf	                        (rev 0)
+++ projects/ejb3/trunk/core/src/test/resources/test/externalrefscoped/second-ejb-jar/META-INF/manifest.mf	2008-05-07 15:30:31 UTC (rev 73110)
@@ -0,0 +1 @@
+Class-Path: externalrefscoped-second-client-view.jar
\ No newline at end of file




More information about the jboss-cvs-commits mailing list