[jboss-cvs] JBossAS SVN: r104880 - in trunk: testsuite/imports and 13 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon May 17 15:25:52 EDT 2010


Author: alex.loubyansky at jboss.com
Date: 2010-05-17 15:25:51 -0400 (Mon, 17 May 2010)
New Revision: 104880

Added:
   trunk/testsuite/src/main/org/jboss/test/ejbdepends/
   trunk/testsuite/src/main/org/jboss/test/ejbdepends/ejb/
   trunk/testsuite/src/main/org/jboss/test/ejbdepends/ejb/MySession.java
   trunk/testsuite/src/main/org/jboss/test/ejbdepends/ejb/MySessionBean.java
   trunk/testsuite/src/main/org/jboss/test/ejbdepends/ejb/MySessionHome.java
   trunk/testsuite/src/main/org/jboss/test/ejbdepends/test/
   trunk/testsuite/src/main/org/jboss/test/ejbdepends/test/EjbDependsUnitTestCase.java
   trunk/testsuite/src/resources/ejbdepends/
   trunk/testsuite/src/resources/ejbdepends/ear/
   trunk/testsuite/src/resources/ejbdepends/ear/META-INF/
   trunk/testsuite/src/resources/ejbdepends/ear/META-INF/application.xml
   trunk/testsuite/src/resources/ejbdepends/ejb1/
   trunk/testsuite/src/resources/ejbdepends/ejb1/META-INF/
   trunk/testsuite/src/resources/ejbdepends/ejb1/META-INF/ejb-jar.xml
   trunk/testsuite/src/resources/ejbdepends/ejb1/META-INF/jboss.xml
   trunk/testsuite/src/resources/ejbdepends/ejb2/
   trunk/testsuite/src/resources/ejbdepends/ejb2/META-INF/
   trunk/testsuite/src/resources/ejbdepends/ejb2/META-INF/ejb-jar.xml
   trunk/testsuite/src/resources/ejbdepends/ejb2/META-INF/jboss.xml
Modified:
   trunk/server/src/main/java/org/jboss/ejb/deployers/EjbDeployer.java
   trunk/testsuite/imports/sections/ejb.xml
   trunk/testsuite/imports/test-jars.xml
Log:
JBAS-8032

Modified: trunk/server/src/main/java/org/jboss/ejb/deployers/EjbDeployer.java
===================================================================
--- trunk/server/src/main/java/org/jboss/ejb/deployers/EjbDeployer.java	2010-05-17 18:03:06 UTC (rev 104879)
+++ trunk/server/src/main/java/org/jboss/ejb/deployers/EjbDeployer.java	2010-05-17 19:25:51 UTC (rev 104880)
@@ -430,7 +430,7 @@
       /* TODO: this is too coarse as bean to bean depends are being pulled up to the module level
          and an ejb module cannot depend on the beans it creates. The ejb deployer needs to
          be refactored into a component based deployer.
-      */
+         JBAS-8032
       try
       {
          for(String depend : beanDepends)
@@ -445,6 +445,7 @@
       {
          throw new DeploymentException(e);
       }
+      */
       ejbModule.setDependencies(dependencies);
 
       unit.addAttachment("EjbServiceMetaData", ejbModule, ServiceMetaData.class);

Modified: trunk/testsuite/imports/sections/ejb.xml
===================================================================
--- trunk/testsuite/imports/sections/ejb.xml	2010-05-17 18:03:06 UTC (rev 104879)
+++ trunk/testsuite/imports/sections/ejb.xml	2010-05-17 19:25:51 UTC (rev 104880)
@@ -11,4 +11,35 @@
          </fileset>
       </jar>
    </target>
+
+   <!-- ejbdepends test -->
+   <target name="_jars-ejbdepends">
+      <mkdir dir="${build.lib}"/>
+      <jar destfile="${build.lib}/ejbdepends1.jar">
+         <fileset dir="${build.classes}">
+            <include name="org/jboss/test/ejbdepends/ejb/**"/>
+         </fileset>
+         <fileset dir="${build.resources}/ejbdepends/ejb1">
+            <include name="**"/>
+         </fileset>
+      </jar>
+      <jar destfile="${build.lib}/ejbdepends2.jar">
+         <fileset dir="${build.classes}">
+            <include name="org/jboss/test/ejbdepends/ejb/**"/>
+         </fileset>
+         <fileset dir="${build.resources}/ejbdepends/ejb2">
+            <include name="**"/>
+         </fileset>
+      </jar>
+      <jar destfile="${build.lib}/ejbdepends.ear">
+        <fileset dir="${build.resources}/ejbdepends/ear">
+           <include name="META-INF/*.*"/>
+        </fileset>
+        <fileset dir="${build.lib}">
+           <include name="ejbdepends1.jar"/>
+           <include name="ejbdepends2.jar"/>
+        </fileset>
+      </jar>
+   </target>
+
 </project>
\ No newline at end of file

Modified: trunk/testsuite/imports/test-jars.xml
===================================================================
--- trunk/testsuite/imports/test-jars.xml	2010-05-17 18:03:06 UTC (rev 104879)
+++ trunk/testsuite/imports/test-jars.xml	2010-05-17 19:25:51 UTC (rev 104880)
@@ -112,6 +112,7 @@
         _jars-ejbconf,
         _jars-ejbproxy,        
         _jars-entity,
+        _jars-ejbdepends,
         _jars-entitydepends,
         _jars-entityexc,
         _jars-excepiiop,

Added: trunk/testsuite/src/main/org/jboss/test/ejbdepends/ejb/MySession.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/ejbdepends/ejb/MySession.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/ejbdepends/ejb/MySession.java	2010-05-17 19:25:51 UTC (rev 104880)
@@ -0,0 +1,14 @@
+package org.jboss.test.ejbdepends.ejb;
+
+import java.rmi.RemoteException;
+
+/**
+ * A MySession.
+ * 
+ * @author <a href="alex at jboss.com">Alexey Loubyansky</a>
+ * @version $Revision: 1.1 $
+ */
+public interface MySession extends javax.ejb.EJBObject
+{
+   void test() throws RemoteException;
+}

Added: trunk/testsuite/src/main/org/jboss/test/ejbdepends/ejb/MySessionBean.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/ejbdepends/ejb/MySessionBean.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/ejbdepends/ejb/MySessionBean.java	2010-05-17 19:25:51 UTC (rev 104880)
@@ -0,0 +1,55 @@
+package org.jboss.test.ejbdepends.ejb;
+
+import java.rmi.RemoteException;
+
+import javax.ejb.EJBException;
+import javax.ejb.SessionBean;
+import javax.ejb.SessionContext;
+
+/**
+ * A MySessionBean.
+ * 
+ * @author <a href="alex at jboss.com">Alexey Loubyansky</a>
+ * @version $Revision: 1.1 $
+ */
+public class MySessionBean implements SessionBean
+{
+
+   public void test() throws RemoteException
+   {
+      
+   }
+   
+   public void ejbCreate() throws RemoteException
+   {
+   }
+   
+   @Override
+   public void ejbActivate() throws EJBException, RemoteException
+   {
+      // TODO Auto-generated method stub
+      
+   }
+
+   @Override
+   public void ejbPassivate() throws EJBException, RemoteException
+   {
+      // TODO Auto-generated method stub
+      
+   }
+
+   @Override
+   public void ejbRemove() throws EJBException, RemoteException
+   {
+      // TODO Auto-generated method stub
+      
+   }
+
+   @Override
+   public void setSessionContext(SessionContext arg0) throws EJBException, RemoteException
+   {
+      // TODO Auto-generated method stub
+      
+   }
+
+}

Added: trunk/testsuite/src/main/org/jboss/test/ejbdepends/ejb/MySessionHome.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/ejbdepends/ejb/MySessionHome.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/ejbdepends/ejb/MySessionHome.java	2010-05-17 19:25:51 UTC (rev 104880)
@@ -0,0 +1,17 @@
+package org.jboss.test.ejbdepends.ejb;
+
+import java.rmi.RemoteException;
+
+import javax.ejb.CreateException;
+import javax.ejb.EJBHome;
+
+/**
+ * A MySessionHome.
+ * 
+ * @author <a href="alex at jboss.com">Alexey Loubyansky</a>
+ * @version $Revision: 1.1 $
+ */
+public interface MySessionHome extends EJBHome
+{
+   MySession create() throws CreateException, RemoteException;
+}

Added: trunk/testsuite/src/main/org/jboss/test/ejbdepends/test/EjbDependsUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/ejbdepends/test/EjbDependsUnitTestCase.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/ejbdepends/test/EjbDependsUnitTestCase.java	2010-05-17 19:25:51 UTC (rev 104880)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.test.ejbdepends.test;
+
+
+import javax.naming.InitialContext;
+
+import org.jboss.test.JBossTestCase;
+import junit.framework.Test;
+
+/**
+ * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
+ * @version <tt>$Revision: 81036 $</tt>
+ */
+public class EjbDependsUnitTestCase
+   extends JBossTestCase
+{
+   public EjbDependsUnitTestCase(String name)
+   {
+      super(name);
+   }
+
+   public static Test suite() throws Exception
+   {
+      return getDeploySetup(EjbDependsUnitTestCase.class, "ejbdepends.ear");
+   }
+
+   public void testJBAS8032() throws Exception
+   {
+      InitialContext ic = new InitialContext();
+      assertNotNull(ic.lookup("MySession"));
+      assertNotNull(ic.lookup("MySession2"));
+      assertNotNull(ic.lookup("MySession3"));
+   }
+}

Added: trunk/testsuite/src/resources/ejbdepends/ear/META-INF/application.xml
===================================================================
--- trunk/testsuite/src/resources/ejbdepends/ear/META-INF/application.xml	                        (rev 0)
+++ trunk/testsuite/src/resources/ejbdepends/ear/META-INF/application.xml	2010-05-17 19:25:51 UTC (rev 104880)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="5" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd">
+   <display-name>EE5 client test</display-name>
+   <module>
+      <ejb>ejbdepends1.jar</ejb>
+   </module>
+   <module>
+      <ejb>ejbdepends2.jar</ejb>
+   </module>
+</application>

Added: trunk/testsuite/src/resources/ejbdepends/ejb1/META-INF/ejb-jar.xml
===================================================================
--- trunk/testsuite/src/resources/ejbdepends/ejb1/META-INF/ejb-jar.xml	                        (rev 0)
+++ trunk/testsuite/src/resources/ejbdepends/ejb1/META-INF/ejb-jar.xml	2010-05-17 19:25:51 UTC (rev 104880)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
+
+<ejb-jar >
+
+   <enterprise-beans>
+
+      <session>
+         <ejb-name>MySession</ejb-name>
+         <home>org.jboss.test.ejbdepends.ejb.MySessionHome</home>
+         <remote>org.jboss.test.ejbdepends.ejb.MySession</remote>
+         <ejb-class>org.jboss.test.ejbdepends.ejb.MySessionBean</ejb-class>
+         <session-type>Stateless</session-type>
+         <transaction-type>Container</transaction-type>
+      </session>
+
+      <session>
+         <ejb-name>MySession2</ejb-name>
+         <home>org.jboss.test.ejbdepends.ejb.MySessionHome</home>
+         <remote>org.jboss.test.ejbdepends.ejb.MySession</remote>
+         <ejb-class>org.jboss.test.ejbdepends.ejb.MySessionBean</ejb-class>
+         <session-type>Stateless</session-type>
+         <transaction-type>Container</transaction-type>
+      </session>
+
+   </enterprise-beans>
+</ejb-jar>
\ No newline at end of file

Added: trunk/testsuite/src/resources/ejbdepends/ejb1/META-INF/jboss.xml
===================================================================
--- trunk/testsuite/src/resources/ejbdepends/ejb1/META-INF/jboss.xml	                        (rev 0)
+++ trunk/testsuite/src/resources/ejbdepends/ejb1/META-INF/jboss.xml	2010-05-17 19:25:51 UTC (rev 104880)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 3.0//EN" "http://www.jboss.org/j2ee/dtd/jboss_3_0.dtd">
+
+<jboss>
+   <enterprise-beans>
+      <session>
+         <ejb-name>MySession</ejb-name>
+         <depends>jboss.j2ee:jndiName=MySession2,service=EJB</depends>
+      </session>
+
+      <session>
+         <ejb-name>MySession2</ejb-name>
+         <depends>jboss.j2ee:jndiName=MySession3,service=EJB</depends>
+      </session>
+
+   </enterprise-beans>
+</jboss>

Added: trunk/testsuite/src/resources/ejbdepends/ejb2/META-INF/ejb-jar.xml
===================================================================
--- trunk/testsuite/src/resources/ejbdepends/ejb2/META-INF/ejb-jar.xml	                        (rev 0)
+++ trunk/testsuite/src/resources/ejbdepends/ejb2/META-INF/ejb-jar.xml	2010-05-17 19:25:51 UTC (rev 104880)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
+
+<ejb-jar >
+
+   <enterprise-beans>
+
+      <session>
+         <ejb-name>MySession3</ejb-name>
+         <home>org.jboss.test.ejbdepends.ejb.MySessionHome</home>
+         <remote>org.jboss.test.ejbdepends.ejb.MySession</remote>
+         <ejb-class>org.jboss.test.ejbdepends.ejb.MySessionBean</ejb-class>
+         <session-type>Stateless</session-type>
+         <transaction-type>Container</transaction-type>
+      </session>
+
+   </enterprise-beans>
+</ejb-jar>
\ No newline at end of file

Added: trunk/testsuite/src/resources/ejbdepends/ejb2/META-INF/jboss.xml
===================================================================
--- trunk/testsuite/src/resources/ejbdepends/ejb2/META-INF/jboss.xml	                        (rev 0)
+++ trunk/testsuite/src/resources/ejbdepends/ejb2/META-INF/jboss.xml	2010-05-17 19:25:51 UTC (rev 104880)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 3.0//EN" "http://www.jboss.org/j2ee/dtd/jboss_3_0.dtd">
+
+<jboss>
+   <enterprise-beans>
+
+      <session>
+         <ejb-name>MySession3</ejb-name>
+      </session>
+
+   </enterprise-beans>
+</jboss>




More information about the jboss-cvs-commits mailing list