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

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Mar 26 13:11:29 EDT 2008


Author: ALRubinger
Date: 2008-03-26 13:11:28 -0400 (Wed, 26 Mar 2008)
New Revision: 71308

Added:
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/AccessBean.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/AccessRemoteBusiness.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestBean.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestLocal.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestLocalBusiness.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestLocalHome.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestRemote.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestRemoteBusiness.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestRemoteHome.java
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/unit/
   projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/unit/NoBusinessInterfaceFromEjb21CreateUnitTestCase.java
Modified:
   projects/ejb3/trunk/core/build-test.xml
   projects/ejb3/trunk/core/src/test/resources/testrunner-config/jbossas_configuration-ejb3_test-bindings.xml
Log:
[EJBTHREE-1059] Added Tests

Modified: projects/ejb3/trunk/core/build-test.xml
===================================================================
--- projects/ejb3/trunk/core/build-test.xml	2008-03-26 16:33:59 UTC (rev 71307)
+++ projects/ejb3/trunk/core/build-test.xml	2008-03-26 17:11:28 UTC (rev 71308)
@@ -2295,6 +2295,10 @@
       <build-simple-jar name="ejbthree1057"/>
    </target>
    
+   <target name="ejbthree1059" >
+      <build-simple-jar name="ejbthree1059"/>
+   </target>
+  
    <target name="ejbthree1060" >
       <build-simple-jar name="ejbthree1060"/>
    </target>
@@ -4148,7 +4152,7 @@
       ejbthree939,
       ejbthree953, ejbthree957, ejbthree959, ejbthree963, ejbthree967, ejbthree971, ejbthree973, ejbthree985, ejbthree986,
       ejbthree989, ejbthree994, ejbthree1020, ejbthree1023, ejbthree1025, ejbthree1040,
-      ejbthree1057, ejbthree1060,
+      ejbthree1057, ejbthree1059, ejbthree1060,
       ejbthree1062,
       ejbthree1066, ejbthree1071, ejbthree1075, ejbthree1082, ejbthree1090, ejbthree1092, ejbthree1119, ejbthree1122, ejbthree1123, ejbthree1127,
       ejbthree1130, 
@@ -4376,6 +4380,7 @@
 
 
          <jvmarg line="${jvmargs}" />
+         <!-- <jvmarg line="${jvmargs} -Xrunjdwp:transport=dt_socket,address=8788,server=y,suspend=y" />  -->
          <classpath>
            
            <path refid="test.classpath" />
@@ -5141,6 +5146,9 @@
          <param name="test" value="ejbthree1057"/>
       </antcall>
       <antcall target="test" inheritRefs="true">
+         <param name="test" value="ejbthree1059"/>
+      </antcall>
+      <antcall target="test" inheritRefs="true">
          <param name="test" value="ejbthree1060"/>
       </antcall>
       <antcall target="test" inheritRefs="true">

Added: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/AccessBean.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/AccessBean.java	                        (rev 0)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/AccessBean.java	2008-03-26 17:11:28 UTC (rev 71308)
@@ -0,0 +1,87 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, 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.ejbthree1059;
+
+import javax.ejb.CreateException;
+import javax.ejb.EJB;
+import javax.ejb.EJBLocalHome;
+import javax.ejb.Remote;
+import javax.ejb.Stateless;
+
+import org.jboss.ejb3.annotation.RemoteBinding;
+
+/**
+ * AccessBean
+ * 
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+ at Stateless
+ at Remote(AccessRemoteBusiness.class)
+ at RemoteBinding(jndiBinding = AccessRemoteBusiness.JNDI_NAME)
+public class AccessBean implements AccessRemoteBusiness
+{
+
+   // Instance Members
+   @EJB
+   TestLocalHome localHome;
+
+   // Required Implementations
+
+   public void testValid()
+   {
+      // Obtain local instance
+      TestLocal local = null;
+      try
+      {
+         local = this.localHome.createValid();
+      }
+      catch (CreateException ce)
+      {
+         throw new RuntimeException(ce);
+      }
+
+      // Invoke
+      local.test();
+
+   }
+
+   public void testInvalid()
+   {
+      // Attempt to create business interface from EJB21 create
+      try
+      {
+         this.localHome.createInvalid();
+      }
+      catch (CreateException ce)
+      {
+         // Expected
+         return;
+      }
+
+      // Invoke
+      throw new RuntimeException("Business interface not have been created from " + EJBLocalHome.class.getName()
+            + ".create<METHOD>()");
+
+   }
+
+}


Property changes on: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/AccessBean.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/AccessRemoteBusiness.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/AccessRemoteBusiness.java	                        (rev 0)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/AccessRemoteBusiness.java	2008-03-26 17:11:28 UTC (rev 71308)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, 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.ejbthree1059;
+
+/**
+ * AccessRemoteBusiness
+ * 
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface AccessRemoteBusiness
+{
+   String JNDI_NAME = "Access/remote";
+   
+   void testValid();
+   
+   void testInvalid();
+}


Property changes on: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/AccessRemoteBusiness.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestBean.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestBean.java	                        (rev 0)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestBean.java	2008-03-26 17:11:28 UTC (rev 71308)
@@ -0,0 +1,60 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, 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.ejbthree1059;
+
+import javax.ejb.Local;
+import javax.ejb.LocalHome;
+import javax.ejb.Remote;
+import javax.ejb.RemoteHome;
+import javax.ejb.Stateful;
+
+import org.jboss.ejb3.annotation.LocalBinding;
+import org.jboss.ejb3.annotation.LocalHomeBinding;
+import org.jboss.ejb3.annotation.RemoteBinding;
+import org.jboss.ejb3.annotation.RemoteHomeBinding;
+
+/**
+ * TestBean
+ * 
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+ at Stateful
+ at Local(
+{TestLocal.class, TestLocalBusiness.class})
+ at Remote(
+{TestRemote.class, TestRemoteBusiness.class})
+ at LocalHome(TestLocalHome.class)
+ at RemoteHome(TestRemoteHome.class)
+ at LocalBinding(jndiBinding = TestLocalBusiness.JNDI_NAME)
+ at RemoteBinding(jndiBinding = TestRemoteBusiness.JNDI_NAME)
+ at LocalHomeBinding(jndiBinding = TestLocalHome.JNDI_NAME)
+ at RemoteHomeBinding(jndiBinding = TestRemoteHome.JNDI_NAME)
+public class TestBean implements TestRemoteBusiness, TestLocalBusiness
+{
+
+   // Required Implementations
+   public void test()
+   {
+
+   }
+}


Property changes on: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestBean.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestLocal.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestLocal.java	                        (rev 0)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestLocal.java	2008-03-26 17:11:28 UTC (rev 71308)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, 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.ejbthree1059;
+
+import javax.ejb.EJBLocalObject;
+
+/**
+ * TestLocal
+ * 
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface TestLocal extends EJBLocalObject
+{
+   void test();
+}


Property changes on: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestLocal.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestLocalBusiness.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestLocalBusiness.java	                        (rev 0)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestLocalBusiness.java	2008-03-26 17:11:28 UTC (rev 71308)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, 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.ejbthree1059;
+
+/**
+ * TestLocalBusiness
+ * 
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface TestLocalBusiness
+{
+   String JNDI_NAME = "Test/local";
+
+   void test();
+}


Property changes on: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestLocalBusiness.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestLocalHome.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestLocalHome.java	                        (rev 0)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestLocalHome.java	2008-03-26 17:11:28 UTC (rev 71308)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, 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.ejbthree1059;
+
+import javax.ejb.CreateException;
+import javax.ejb.EJBLocalHome;
+
+/**
+ * TestLocalHome
+ * 
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface TestLocalHome extends EJBLocalHome
+{
+   String JNDI_NAME = "Test/localHome";
+
+   TestLocal createValid() throws CreateException;
+
+   TestLocalBusiness createInvalid() throws CreateException;
+}


Property changes on: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestLocalHome.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestRemote.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestRemote.java	                        (rev 0)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestRemote.java	2008-03-26 17:11:28 UTC (rev 71308)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, 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.ejbthree1059;
+
+import javax.ejb.EJBObject;
+
+/**
+ * TestRemote
+ * 
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface TestRemote extends EJBObject
+{
+   void test();
+}


Property changes on: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestRemote.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestRemoteBusiness.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestRemoteBusiness.java	                        (rev 0)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestRemoteBusiness.java	2008-03-26 17:11:28 UTC (rev 71308)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, 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.ejbthree1059;
+
+/**
+ * TestRemoteBusiness
+ * 
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface TestRemoteBusiness
+{
+   String JNDI_NAME = "Test/remote";
+
+   void test();
+}


Property changes on: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestRemoteBusiness.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestRemoteHome.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestRemoteHome.java	                        (rev 0)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestRemoteHome.java	2008-03-26 17:11:28 UTC (rev 71308)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, 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.ejbthree1059;
+
+import java.rmi.RemoteException;
+
+import javax.ejb.CreateException;
+import javax.ejb.EJBHome;
+
+/**
+ * TestRemoteHome
+ * 
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface TestRemoteHome extends EJBHome
+{
+   String JNDI_NAME = "Test/remoteHome";
+
+   TestRemote createValid() throws RemoteException, CreateException;
+
+   TestRemoteBusiness createInvalid() throws RemoteException, CreateException;
+}


Property changes on: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/TestRemoteHome.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/unit/NoBusinessInterfaceFromEjb21CreateUnitTestCase.java
===================================================================
--- projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/unit/NoBusinessInterfaceFromEjb21CreateUnitTestCase.java	                        (rev 0)
+++ projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/unit/NoBusinessInterfaceFromEjb21CreateUnitTestCase.java	2008-03-26 17:11:28 UTC (rev 71308)
@@ -0,0 +1,81 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors as indicated
+ * 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.ejb3.test.ejbthree1059.unit;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+
+import org.jboss.ejb3.test.ejbthree1059.AccessRemoteBusiness;
+import org.jboss.ejb3.test.ejbthree1059.TestRemoteBusiness;
+import org.jboss.ejb3.test.ejbthree1059.TestRemoteHome;
+import org.jboss.test.JBossTestCase;
+
+/**
+ * Tests to ensure that a business interface is not returned from
+ * an EJBHome/EJBLocalHome create<METHOD> method.
+ * 
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class NoBusinessInterfaceFromEjb21CreateUnitTestCase extends JBossTestCase
+{
+   public NoBusinessInterfaceFromEjb21CreateUnitTestCase(String name)
+   {
+      super(name);
+   }
+
+   public static Test suite() throws Exception
+   {
+      return getDeploySetup(NoBusinessInterfaceFromEjb21CreateUnitTestCase.class, "ejbthree1059.jar");
+   }
+
+   public void testRemoteBusinessFromEjb21CreateFails() throws Exception
+   {
+
+      // Obtain Home
+      TestRemoteHome home = (TestRemoteHome) this.getInitialContext().lookup(TestRemoteHome.JNDI_NAME);
+
+      // Attempt an invalid creation
+      home.createInvalid();
+
+   }
+
+   public void testLocalBusinessFromEjb21CreateFails() throws Exception
+   {
+
+      // Obtain access bean
+      AccessRemoteBusiness access = (AccessRemoteBusiness) this.getInitialContext().lookup(
+            AccessRemoteBusiness.JNDI_NAME);
+
+      // Attempt invalid creation
+      try
+      {
+         access.testInvalid();
+      }
+      catch (Exception e)
+      {
+         TestCase.fail(e.getMessage());
+      }
+
+   }
+
+}


Property changes on: projects/ejb3/trunk/core/src/test/java/org/jboss/ejb3/test/ejbthree1059/unit/NoBusinessInterfaceFromEjb21CreateUnitTestCase.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: projects/ejb3/trunk/core/src/test/resources/testrunner-config/jbossas_configuration-ejb3_test-bindings.xml
===================================================================
--- projects/ejb3/trunk/core/src/test/resources/testrunner-config/jbossas_configuration-ejb3_test-bindings.xml	2008-03-26 16:33:59 UTC (rev 71307)
+++ projects/ejb3/trunk/core/src/test/resources/testrunner-config/jbossas_configuration-ejb3_test-bindings.xml	2008-03-26 17:11:28 UTC (rev 71308)
@@ -138,6 +138,7 @@
         <test name="ejbthree1025" />
         <test name="ejbthree1040" />
         <test name="ejbthree1057" />
+        <test name="ejbthree1059" />
         <test name="ejbthree1060" />
         <test name="ejbthree1062" />
         <test name="ejbthree1066" />




More information about the jboss-cvs-commits mailing list