[jboss-cvs] JBossAS SVN: r84977 - in branches/Branch_5_x: testsuite/imports/sections and 5 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Mar 2 06:17:01 EST 2009


Author: wolfc
Date: 2009-03-02 06:17:01 -0500 (Mon, 02 Mar 2009)
New Revision: 84977

Added:
   branches/Branch_5_x/testsuite/src/main/org/jboss/test/ejb3/jbas5713/
   branches/Branch_5_x/testsuite/src/main/org/jboss/test/ejb3/jbas5713/ejb1/
   branches/Branch_5_x/testsuite/src/main/org/jboss/test/ejb3/jbas5713/ejb1/FirstBean.java
   branches/Branch_5_x/testsuite/src/main/org/jboss/test/ejb3/jbas5713/ejb1/FirstRemote.java
   branches/Branch_5_x/testsuite/src/main/org/jboss/test/ejb3/jbas5713/ejb2/
   branches/Branch_5_x/testsuite/src/main/org/jboss/test/ejb3/jbas5713/ejb2/SecondBean.java
   branches/Branch_5_x/testsuite/src/main/org/jboss/test/ejb3/jbas5713/ejb2/SecondRemote.java
   branches/Branch_5_x/testsuite/src/main/org/jboss/test/ejb3/jbas5713/unit/
   branches/Branch_5_x/testsuite/src/main/org/jboss/test/ejb3/jbas5713/unit/RefSecondJarUnitTestCase.java
Modified:
   branches/Branch_5_x/ejb3/src/main/org/jboss/ejb3/deployers/JBoss5DeploymentScope.java
   branches/Branch_5_x/testsuite/imports/sections/ejb3.xml
Log:
JBAS-5713: test for references across jars and added an extra check

Modified: branches/Branch_5_x/ejb3/src/main/org/jboss/ejb3/deployers/JBoss5DeploymentScope.java
===================================================================
--- branches/Branch_5_x/ejb3/src/main/org/jboss/ejb3/deployers/JBoss5DeploymentScope.java	2009-03-02 11:15:46 UTC (rev 84976)
+++ branches/Branch_5_x/ejb3/src/main/org/jboss/ejb3/deployers/JBoss5DeploymentScope.java	2009-03-02 11:17:01 UTC (rev 84977)
@@ -203,6 +203,10 @@
       {
          log.debug("Found endpoint for ejbLink: "+ejbLink+", endpoint: "+endpoint);
          Ejb3Deployment deployment = deployments.get(endpoint.getPathName());
+         // Note that this should never happen because the dependencies should have been
+         // resolved by the MappedReferenceMetaDataResolverDeployer
+         if(deployment == null)
+            throw new IllegalStateException("JBAS-5713: could not find an ejb3 deployment for " + endpoint.getPathName() + " (yet), try reordering the jars or adding explicit dependencies");
          String ejbObjectName = JavaEEComponentHelper.createObjectName(deployment, endpoint.getName());
          ObjectName ejbON;
          try

Modified: branches/Branch_5_x/testsuite/imports/sections/ejb3.xml
===================================================================
--- branches/Branch_5_x/testsuite/imports/sections/ejb3.xml	2009-03-02 11:15:46 UTC (rev 84976)
+++ branches/Branch_5_x/testsuite/imports/sections/ejb3.xml	2009-03-02 11:17:01 UTC (rev 84977)
@@ -1,4 +1,24 @@
 <project name="tests-ejb3-jars">
+   <target name="jbas5713" depends="compile">
+      <mkdir dir="${build.lib}" />
+      
+      <jar destfile="${build.lib}/jbas5713-ejb1.jar">
+         <fileset dir="${build.classes}">
+            <include name="org/jboss/test/ejb3/jbas5713/ejb1/**" />
+         </fileset>
+      </jar>
+      
+      <jar destfile="${build.lib}/jbas5713-ejb2.jar">
+         <fileset dir="${build.classes}">
+            <include name="org/jboss/test/ejb3/jbas5713/ejb2/**" />
+         </fileset>
+      </jar>
+      
+      <jar destfile="${build.lib}/jbas5713.ear">
+         <fileset dir="${build.lib}" includes="jbas5713-*.jar"/>
+      </jar>
+   </target>
+   
    <target name="jbas6161" depends="compile">
       <mkdir dir="${build.lib}" />
       

Added: branches/Branch_5_x/testsuite/src/main/org/jboss/test/ejb3/jbas5713/ejb1/FirstBean.java
===================================================================
--- branches/Branch_5_x/testsuite/src/main/org/jboss/test/ejb3/jbas5713/ejb1/FirstBean.java	                        (rev 0)
+++ branches/Branch_5_x/testsuite/src/main/org/jboss/test/ejb3/jbas5713/ejb1/FirstBean.java	2009-03-02 11:17:01 UTC (rev 84977)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.ejb3.jbas5713.ejb1;
+
+import javax.ejb.EJB;
+import javax.ejb.Stateless;
+
+import org.jboss.test.ejb3.jbas5713.ejb2.SecondRemote;
+
+/**
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+ at Stateless
+public class FirstBean implements FirstRemote
+{
+   @EJB
+   private SecondRemote second;
+}

Added: branches/Branch_5_x/testsuite/src/main/org/jboss/test/ejb3/jbas5713/ejb1/FirstRemote.java
===================================================================
--- branches/Branch_5_x/testsuite/src/main/org/jboss/test/ejb3/jbas5713/ejb1/FirstRemote.java	                        (rev 0)
+++ branches/Branch_5_x/testsuite/src/main/org/jboss/test/ejb3/jbas5713/ejb1/FirstRemote.java	2009-03-02 11:17:01 UTC (rev 84977)
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.ejb3.jbas5713.ejb1;
+
+import javax.ejb.Remote;
+
+/**
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+ at Remote
+public interface FirstRemote
+{
+
+}

Added: branches/Branch_5_x/testsuite/src/main/org/jboss/test/ejb3/jbas5713/ejb2/SecondBean.java
===================================================================
--- branches/Branch_5_x/testsuite/src/main/org/jboss/test/ejb3/jbas5713/ejb2/SecondBean.java	                        (rev 0)
+++ branches/Branch_5_x/testsuite/src/main/org/jboss/test/ejb3/jbas5713/ejb2/SecondBean.java	2009-03-02 11:17:01 UTC (rev 84977)
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.ejb3.jbas5713.ejb2;
+
+import javax.ejb.Stateless;
+
+/**
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+ at Stateless
+public class SecondBean implements SecondRemote
+{
+
+}

Added: branches/Branch_5_x/testsuite/src/main/org/jboss/test/ejb3/jbas5713/ejb2/SecondRemote.java
===================================================================
--- branches/Branch_5_x/testsuite/src/main/org/jboss/test/ejb3/jbas5713/ejb2/SecondRemote.java	                        (rev 0)
+++ branches/Branch_5_x/testsuite/src/main/org/jboss/test/ejb3/jbas5713/ejb2/SecondRemote.java	2009-03-02 11:17:01 UTC (rev 84977)
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.ejb3.jbas5713.ejb2;
+
+import javax.ejb.Remote;
+
+/**
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+ at Remote
+public interface SecondRemote
+{
+
+}

Added: branches/Branch_5_x/testsuite/src/main/org/jboss/test/ejb3/jbas5713/unit/RefSecondJarUnitTestCase.java
===================================================================
--- branches/Branch_5_x/testsuite/src/main/org/jboss/test/ejb3/jbas5713/unit/RefSecondJarUnitTestCase.java	                        (rev 0)
+++ branches/Branch_5_x/testsuite/src/main/org/jboss/test/ejb3/jbas5713/unit/RefSecondJarUnitTestCase.java	2009-03-02 11:17:01 UTC (rev 84977)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.ejb3.jbas5713.unit;
+
+import junit.framework.Test;
+
+import org.jboss.test.JBossTestCase;
+
+/**
+ * Let a bean from jar 1 reference a bean from jar 2 and see what happens.
+ * 
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+public class RefSecondJarUnitTestCase extends JBossTestCase
+{
+   public static Test suite() throws Exception
+   {
+      return getDeploySetup(RefSecondJarUnitTestCase.class, "jbas5713.ear");
+   }
+   
+   public RefSecondJarUnitTestCase(String name)
+   {
+      super(name);
+   }
+   
+   public void testServerFound() throws Exception
+   {
+      serverFound();
+   }
+}




More information about the jboss-cvs-commits mailing list