[jboss-cvs] JBossAS SVN: r74432 - in projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/ejbthree1127: unit and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Jun 11 18:37:50 EDT 2008


Author: ALRubinger
Date: 2008-06-11 18:37:49 -0400 (Wed, 11 Jun 2008)
New Revision: 74432

Removed:
   projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/ejbthree1127/Test21WithNoLocalHomeInterfaceDefinedBean.java
   projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/ejbthree1127/Test21WithNoRemoteHomeInterfaceDefinedBean.java
Modified:
   projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/ejbthree1127/DelegateBean.java
   projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/ejbthree1127/DelegateRemoteBusiness.java
   projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/ejbthree1127/TestLocal.java
   projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/ejbthree1127/unit/InterfaceDefinitionsUnitTestCase.java
Log:
[EJBTHREE-1241] Fix regressions introduced to EJBTHREE-1127 as @Local/@Remote may only accept business interfaces now

Modified: projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/ejbthree1127/DelegateBean.java
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/ejbthree1127/DelegateBean.java	2008-06-11 22:28:52 UTC (rev 74431)
+++ projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/ejbthree1127/DelegateBean.java	2008-06-11 22:37:49 UTC (rev 74432)
@@ -82,24 +82,4 @@
          throw new RuntimeException(e);
       }
    }
-
-   public int testNoLocalHomeDefined()
-   {
-      logger.info("testNoLocalHomeDefined");
-      
-      // Obtain reference to local
-      TestLocal local = null;
-      try
-      {
-         local = (TestLocal)new InitialContext().lookup(TestLocal.JNDI_NAME_NO_LOCAL_HOME);
-      }
-      catch (NamingException ne)
-      {
-         throw new RuntimeException(ne);
-      }
-      
-      
-      return local.test();
-   }
-
 }

Modified: projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/ejbthree1127/DelegateRemoteBusiness.java
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/ejbthree1127/DelegateRemoteBusiness.java	2008-06-11 22:28:52 UTC (rev 74431)
+++ projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/ejbthree1127/DelegateRemoteBusiness.java	2008-06-11 22:37:49 UTC (rev 74432)
@@ -30,10 +30,8 @@
 public interface DelegateRemoteBusiness
 {
    String JNDI_NAME = "DelegateBean/remote";
-   
-   int testNoLocalHomeDefined();
-   
+
    int testNoLocalExplicitlyDefined();
-   
+
    int testLocalBusinessOnlyDefined();
 }

Deleted: projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/ejbthree1127/Test21WithNoLocalHomeInterfaceDefinedBean.java
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/ejbthree1127/Test21WithNoLocalHomeInterfaceDefinedBean.java	2008-06-11 22:28:52 UTC (rev 74431)
+++ projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/ejbthree1127/Test21WithNoLocalHomeInterfaceDefinedBean.java	2008-06-11 22:37:49 UTC (rev 74432)
@@ -1,52 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2007, 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.ejbthree1127;
-
-import javax.ejb.Local;
-import javax.ejb.Stateless;
-
-import org.jboss.ejb3.annotation.LocalBinding;
-import org.jboss.logging.Logger;
-
-/**
- * A Test EJB with a 2.1 View denoted only by a Local interface;
- * the lack of a Local Home must lead to deployment failure
- * 
- * @author <a href="mailto:andrew.rubinger at redhat.com">ALR</a>
- * @version $Revision: $
- */
- at Stateless
- at Local(TestLocal.class)
- at LocalBinding(jndiBinding=TestLocal.JNDI_NAME_NO_LOCAL_HOME)
-public class Test21WithNoLocalHomeInterfaceDefinedBean
-{
-   // Class Members
-   private static final Logger log = Logger.getLogger(Test21WithNoLocalHomeInterfaceDefinedBean.class);
-
-   // Required Implementations
-
-   public int test()
-   {
-      log.info("Called");
-      return TestLocal.RETURN_VALUE;
-   }
-}

Deleted: projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/ejbthree1127/Test21WithNoRemoteHomeInterfaceDefinedBean.java
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/ejbthree1127/Test21WithNoRemoteHomeInterfaceDefinedBean.java	2008-06-11 22:28:52 UTC (rev 74431)
+++ projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/ejbthree1127/Test21WithNoRemoteHomeInterfaceDefinedBean.java	2008-06-11 22:37:49 UTC (rev 74432)
@@ -1,52 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2007, 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.ejbthree1127;
-
-import javax.ejb.Remote;
-import javax.ejb.Stateless;
-
-import org.jboss.ejb3.annotation.RemoteBinding;
-import org.jboss.logging.Logger;
-
-/**
- * A Test EJB with a 2.1 View denoted only by a Remote interface;
- * the lack of a Remote Home must lead to deployment failure
- * 
- * @author <a href="mailto:andrew.rubinger at redhat.com">ALR</a>
- * @version $Revision: $
- */
- at Stateless
- at Remote(TestRemote.class)
- at RemoteBinding(jndiBinding=TestRemote.JNDI_NAME_NO_REMOTE_HOME_DEFINED)
-public class Test21WithNoRemoteHomeInterfaceDefinedBean
-{
-   // Class Members
-   private static final Logger log = Logger.getLogger(Test21WithNoRemoteHomeInterfaceDefinedBean.class);
-
-   // Required Implementations
-
-   public int test()
-   {
-      log.info("Called");
-      return TestRemote.RETURN_VALUE;
-   }
-}

Modified: projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/ejbthree1127/TestLocal.java
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/ejbthree1127/TestLocal.java	2008-06-11 22:28:52 UTC (rev 74431)
+++ projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/ejbthree1127/TestLocal.java	2008-06-11 22:37:49 UTC (rev 74432)
@@ -30,9 +30,7 @@
  * @version $Revision: $
  */
 public interface TestLocal extends EJBLocalObject
-{
-   String JNDI_NAME_NO_LOCAL_HOME = "NoLocalHomeBean/local";
-   
+{   
    int RETURN_VALUE = 1;
    
    int test();

Modified: projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/ejbthree1127/unit/InterfaceDefinitionsUnitTestCase.java
===================================================================
--- projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/ejbthree1127/unit/InterfaceDefinitionsUnitTestCase.java	2008-06-11 22:28:52 UTC (rev 74431)
+++ projects/ejb3/trunk/testsuite/src/test/java/org/jboss/ejb3/test/ejbthree1127/unit/InterfaceDefinitionsUnitTestCase.java	2008-06-11 22:37:49 UTC (rev 74432)
@@ -21,8 +21,6 @@
  */
 package org.jboss.ejb3.test.ejbthree1127.unit;
 
-import javax.naming.NameNotFoundException;
-
 import junit.framework.Test;
 
 import org.jboss.ejb3.test.ejbthree1127.DelegateRemoteBusiness;
@@ -86,27 +84,6 @@
    }
 
    /**
-    * Ensure that the Test EJB with 2.1 View defined only by a Remote interface 
-    * (no Remote Home) fails to deploy
-    */
-   public void test21ViewRemoteHomeInterfaceNotDefined() throws Exception
-   {
-      // Lookup EJB Home
-      try
-      {
-         this.getInitialContext().lookup(TestRemote.JNDI_NAME_NO_REMOTE_HOME_DEFINED);
-      }
-      catch (NameNotFoundException nnfe)
-      {
-         // Expected
-         return;
-      }
-
-      // If we've reached this point, the EJB that shouldn't have deployed, did
-      JBossTestCase.fail("Test EJB with 2.1 View defining no Remote Home should not successfully deploy.");
-   }
-
-   /**
     * Ensure that the Test EJB with 3.0 View defined only by @Local to 
     * Local Business interface properly deploys
     */
@@ -132,30 +109,4 @@
       // Invoke 
       assertEquals(ejb.testNoLocalExplicitlyDefined(), TestLocal.RETURN_VALUE);
    }
-
-   /**
-    * Ensure that the Test EJB with 2.1 View defined only by a Local interface 
-    * (no Local Home) fails to deploy
-    */
-   public void test21ViewLocalHomeInterfaceNotDefined() throws Exception
-   {
-      // Lookup Delegate EJB 
-      DelegateRemoteBusiness ejb = (DelegateRemoteBusiness) this.getInitialContext().lookup(
-            DelegateRemoteBusiness.JNDI_NAME);
-
-      // Invoke 
-      try
-      {
-         ejb.testNoLocalHomeDefined();
-      }
-      catch (Exception e)
-      {
-         // Expected
-         return;
-      }
-
-      // If we've reached here, the bean deployed and it shouldn't have
-      JBossTestCase.fail("EJB with 2.1 Local View and no LocalHome defined should not have deployed.");
-   }
-
 }
\ No newline at end of file




More information about the jboss-cvs-commits mailing list