[jboss-cvs] JBossAS SVN: r63299 - in branches/Branch_4_2/ejb3: src/main/org/jboss/ejb3 and 6 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Jun 1 08:38:44 EDT 2007


Author: wolfc
Date: 2007-06-01 08:38:44 -0400 (Fri, 01 Jun 2007)
New Revision: 63299

Added:
   branches/Branch_4_2/ejb3/src/resources/test/ejbthree963/
   branches/Branch_4_2/ejb3/src/resources/test/ejbthree963/META-INF/
   branches/Branch_4_2/ejb3/src/resources/test/ejbthree963/META-INF/jboss.xml
   branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree963/
   branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree963/MyStateful.java
   branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree963/MyStatefulBean.java
   branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree963/unit/
   branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree963/unit/NoEjbCreateTestCase.java
Removed:
   branches/Branch_4_2/ejb3/src/resources/test/ejbthree963/META-INF/
   branches/Branch_4_2/ejb3/src/resources/test/ejbthree963/META-INF/jboss.xml
   branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree963/MyStateful.java
   branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree963/MyStatefulBean.java
   branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree963/unit/
   branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree963/unit/NoEjbCreateTestCase.java
Modified:
   branches/Branch_4_2/ejb3/build-test.xml
   branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3/Ejb3DescriptorHandler.java
Log:
EJBTHREE-963: merged from trunk

Modified: branches/Branch_4_2/ejb3/build-test.xml
===================================================================
--- branches/Branch_4_2/ejb3/build-test.xml	2007-06-01 12:23:19 UTC (rev 63298)
+++ branches/Branch_4_2/ejb3/build-test.xml	2007-06-01 12:38:44 UTC (rev 63299)
@@ -1816,6 +1816,13 @@
       <build-simple-jar name="ejbthree959"/>
    </target>
 
+   <target name="ejbthree963"
+      description="Builds a simple jar files."
+      depends="compile-classes">
+      
+      <build-simple-jar name="ejbthree963"/>
+   </target>
+   
    <target name="jaxws"
       description="Builds a simple jar."
       depends="compile-classes">
@@ -3205,7 +3212,7 @@
    <target name="jars" depends="entityoptimisticlocking, concurrentnaming, propertyreplacement, persistenceunits, invalidtxmdb, descriptortypo, libdeployment, homeinterface, timestampentity, servicexmbean, arjuna, mdbtransactions, unauthenticatedprincipal, clusteredservice, invoker, classloader, 
       circulardependency, jsp, timerdependency, servicedependency, servlet, stateless14, webservices, ear, ejbthree440, 
       ejbthree454, ejbthree653, ejbthree670, ejbthree712, ejbthree724, ejbthree751, ejbthree832, ejbthree921,
-      ejbthree959,
+      ejbthree959, ejbthree963,
       aspectdomain, ejbcontext, schema, mail, scopedclassloader, dependency, jaxws,
       pkg, securitydomain, enventry, 
       jms/managed, naming, bmt, jca/inflowmdb, pool, jms, security, reference21_30, factory, dd/web, txexceptions, 
@@ -3732,6 +3739,9 @@
       <antcall target="test" inheritRefs="true">
          <param name="test" value="ejbthree959"/>
       </antcall>
+      <antcall target="test" inheritRefs="true">
+         <param name="test" value="ejbthree963"/>
+      </antcall>
    </target>
 
    <target name="entity-tests" depends="init" description="Execute all tests">

Modified: branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3/Ejb3DescriptorHandler.java
===================================================================
--- branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3/Ejb3DescriptorHandler.java	2007-06-01 12:23:19 UTC (rev 63298)
+++ branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3/Ejb3DescriptorHandler.java	2007-06-01 12:38:44 UTC (rev 63299)
@@ -23,8 +23,41 @@
 
 import java.lang.annotation.Annotation;
 import java.lang.reflect.Field;
+import java.lang.reflect.Member;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.StringTokenizer;
 
 import javassist.bytecode.ClassFile;
+
+import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
+import javax.annotation.Resource;
+import javax.annotation.security.DeclareRoles;
+import javax.annotation.security.DenyAll;
+import javax.annotation.security.PermitAll;
+import javax.annotation.security.RolesAllowed;
+import javax.ejb.Init;
+import javax.ejb.Local;
+import javax.ejb.LocalHome;
+import javax.ejb.MessageDriven;
+import javax.ejb.PostActivate;
+import javax.ejb.PrePassivate;
+import javax.ejb.Remote;
+import javax.ejb.RemoteHome;
+import javax.ejb.Remove;
+import javax.ejb.Stateless;
+import javax.ejb.TransactionAttribute;
+import javax.ejb.TransactionAttributeType;
+import javax.ejb.TransactionManagement;
+import javax.interceptor.AroundInvoke;
+import javax.interceptor.ExcludeClassInterceptors;
+import javax.interceptor.ExcludeDefaultInterceptors;
+import javax.interceptor.Interceptors;
+
 import org.jboss.annotation.IgnoreDependency;
 import org.jboss.annotation.IgnoreDependencyImpl;
 import org.jboss.annotation.ejb.Clustered;
@@ -54,10 +87,10 @@
 import org.jboss.annotation.ejb.Producers;
 import org.jboss.annotation.ejb.RemoteBinding;
 import org.jboss.annotation.ejb.RemoteBindingImpl;
+import org.jboss.annotation.ejb.RemoteBindings;
+import org.jboss.annotation.ejb.RemoteBindingsImpl;
 import org.jboss.annotation.ejb.RemoteHomeBinding;
 import org.jboss.annotation.ejb.RemoteHomeBindingImpl;
-import org.jboss.annotation.ejb.RemoteBindings;
-import org.jboss.annotation.ejb.RemoteBindingsImpl;
 import org.jboss.annotation.ejb.RemoteHomeImpl;
 import org.jboss.annotation.ejb.ResourceAdapter;
 import org.jboss.annotation.ejb.ResourceAdapterImpl;
@@ -98,7 +131,6 @@
 import org.jboss.ejb.StatelessImpl;
 import org.jboss.ejb.TransactionAttributeImpl;
 import org.jboss.ejb.TransactionManagementImpl;
-import org.jboss.ejb3.Ejb3AnnotationHandler.EJB_TYPE;
 import org.jboss.ejb3.interceptor.InterceptorInfoRepository;
 import org.jboss.ejb3.mdb.ConsumerContainer;
 import org.jboss.ejb3.mdb.MDB;
@@ -136,38 +168,6 @@
 import org.jboss.metamodel.descriptor.RunAs;
 import org.jboss.metamodel.descriptor.SecurityRole;
 
-import javax.annotation.PostConstruct;
-import javax.annotation.PreDestroy;
-import javax.annotation.Resource;
-import javax.annotation.security.DeclareRoles;
-import javax.annotation.security.DenyAll;
-import javax.annotation.security.PermitAll;
-import javax.annotation.security.RolesAllowed;
-import javax.ejb.Init;
-import javax.ejb.Local;
-import javax.ejb.LocalHome;
-import javax.ejb.MessageDriven;
-import javax.ejb.PostActivate;
-import javax.ejb.PrePassivate;
-import javax.ejb.Remote;
-import javax.ejb.RemoteHome;
-import javax.ejb.Remove;
-import javax.ejb.Stateless;
-import javax.ejb.TransactionAttribute;
-import javax.ejb.TransactionAttributeType;
-import javax.ejb.TransactionManagement;
-import javax.interceptor.AroundInvoke;
-import javax.interceptor.ExcludeClassInterceptors;
-import javax.interceptor.ExcludeDefaultInterceptors;
-import javax.interceptor.Interceptors;
-import java.lang.reflect.Member;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.StringTokenizer;
-
 /**
  * @version <tt>$Revision$</tt>
  * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
@@ -745,17 +745,22 @@
             method.setEjbName(container.getEjbName());
 
             Annotation annotation;
-            if(isStateful)
+            Class<? extends Annotation> annotationClass;
+            // EJB3 4.6.2: The class may implement the ejbCreate method(s).
+            if(hasMethod(ejbClass, "ejbCreate"))
             {
-               annotation = new InitImpl();
+               if(isStateful)
+               {
+                  annotation = new InitImpl();
+               }
+               else
+               {
+                  annotation = new PostConstructImpl();
+               }
+               annotationClass = annotation.annotationType();
+               method.setMethodName("ejbCreate");
+               addAnnotations(annotationClass, annotation, container, method);
             }
-            else
-            {
-               annotation = new PostConstructImpl();
-            }
-            Class<? extends Annotation> annotationClass = annotation.annotationType();
-            method.setMethodName("ejbCreate");
-            addAnnotations(annotationClass, annotation, container, method);
 
             annotation = new PostActivateImpl();
             annotationClass = javax.ejb.PostActivate.class;
@@ -1997,4 +2002,27 @@
       return sb.toString();
    }
 
+   /**
+    * Verify whether the class has a method with a certain name.
+    * 
+    * @param cls            the class to check
+    * @param methodName     the method to find
+    * @return               true if a method with that name exists on that class
+    */
+   private boolean hasMethod(Class<?> cls, String methodName)
+   {
+      assert cls != null : "cls is null";
+      assert methodName != null : "methodName is null";
+      
+      for(java.lang.reflect.Method m : cls.getDeclaredMethods())
+      {
+         if(m.getName().equals(methodName))
+            return true;
+      }
+      
+      if(cls.getSuperclass() != null)
+         return hasMethod(cls.getSuperclass(), methodName);
+      
+      return false;
+   }
 }

Copied: branches/Branch_4_2/ejb3/src/resources/test/ejbthree963 (from rev 63054, trunk/ejb3/src/resources/test/ejbthree963)

Copied: branches/Branch_4_2/ejb3/src/resources/test/ejbthree963/META-INF (from rev 63054, trunk/ejb3/src/resources/test/ejbthree963/META-INF)

Deleted: branches/Branch_4_2/ejb3/src/resources/test/ejbthree963/META-INF/jboss.xml
===================================================================
--- trunk/ejb3/src/resources/test/ejbthree963/META-INF/jboss.xml	2007-05-15 15:39:39 UTC (rev 63054)
+++ branches/Branch_4_2/ejb3/src/resources/test/ejbthree963/META-INF/jboss.xml	2007-06-01 12:38:44 UTC (rev 63299)
@@ -1,14 +0,0 @@
-<?xml version="1.0"?>
-<jboss
-        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://www.jboss.org/j2ee/schema/jboss_5_0.xsd"
-        version="3.0">
-   <enterprise-beans>
-      <session>
-         <ejb-name>MyStatefulBean</ejb-name>
-         <jndi-name>MyStatefulBean</jndi-name>
-      </session>
-   </enterprise-beans>
-</jboss>
\ No newline at end of file

Copied: branches/Branch_4_2/ejb3/src/resources/test/ejbthree963/META-INF/jboss.xml (from rev 63054, trunk/ejb3/src/resources/test/ejbthree963/META-INF/jboss.xml)
===================================================================
--- branches/Branch_4_2/ejb3/src/resources/test/ejbthree963/META-INF/jboss.xml	                        (rev 0)
+++ branches/Branch_4_2/ejb3/src/resources/test/ejbthree963/META-INF/jboss.xml	2007-06-01 12:38:44 UTC (rev 63299)
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<jboss
+        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://www.jboss.org/j2ee/schema/jboss_5_0.xsd"
+        version="3.0">
+   <enterprise-beans>
+      <session>
+         <ejb-name>MyStatefulBean</ejb-name>
+         <jndi-name>MyStatefulBean</jndi-name>
+      </session>
+   </enterprise-beans>
+</jboss>
\ No newline at end of file

Copied: branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree963 (from rev 63054, trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree963)

Deleted: branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree963/MyStateful.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree963/MyStateful.java	2007-05-15 15:39:39 UTC (rev 63054)
+++ branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree963/MyStateful.java	2007-06-01 12:38:44 UTC (rev 63299)
@@ -1,36 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2007, 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.ejbthree963;
-
-import java.rmi.Remote;
-import java.rmi.RemoteException;
-
-/**
- * @author carlo
- *
- */
- at javax.ejb.Remote
-public interface MyStateful extends Remote
-{
-   String sayHi() throws RemoteException;
-   void setName(String name) throws RemoteException;
-}

Copied: branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree963/MyStateful.java (from rev 63054, trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree963/MyStateful.java)
===================================================================
--- branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree963/MyStateful.java	                        (rev 0)
+++ branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree963/MyStateful.java	2007-06-01 12:38:44 UTC (rev 63299)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, 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.ejbthree963;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+
+/**
+ * @author carlo
+ *
+ */
+ at javax.ejb.Remote
+public interface MyStateful extends Remote
+{
+   String sayHi() throws RemoteException;
+   void setName(String name) throws RemoteException;
+}

Deleted: branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree963/MyStatefulBean.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree963/MyStatefulBean.java	2007-05-15 15:39:39 UTC (rev 63054)
+++ branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree963/MyStatefulBean.java	2007-06-01 12:38:44 UTC (rev 63299)
@@ -1,77 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2007, 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.ejbthree963;
-
-import java.rmi.RemoteException;
-
-import javax.ejb.EJBException;
-import javax.ejb.SessionBean;
-import javax.ejb.SessionContext;
-import javax.ejb.Stateful;
-
-/**
- * @author carlo
- *
- */
- at Stateful
-public class MyStatefulBean implements MyStateful, SessionBean
-{
-   private static final long serialVersionUID = 1L;
-   
-   private SessionContext ctx;
-   private String name;
-
-   public String sayHi() throws RemoteException
-   {
-      if(ctx == null)
-         throw new IllegalStateException("ctx is null");
-      return "Hi " + name;
-   }
-
-   public void setName(String name) throws RemoteException
-   {
-      this.name = name;
-   }
-
-   // this one is optional
-//   public void ejbCreate() //throws EJBException, RemoteException
-//   {
-//   }
-   
-   public void ejbActivate() //throws EJBException, RemoteException
-   {
-   }
-
-   public void ejbPassivate() //throws EJBException, RemoteException
-   {
-   }
-
-   public void ejbRemove() //throws EJBException, RemoteException
-   {
-   }
-
-   public void setSessionContext(SessionContext ctx) throws EJBException, RemoteException
-   {
-      this.ctx = ctx;
-   }
-
-}

Copied: branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree963/MyStatefulBean.java (from rev 63054, trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree963/MyStatefulBean.java)
===================================================================
--- branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree963/MyStatefulBean.java	                        (rev 0)
+++ branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree963/MyStatefulBean.java	2007-06-01 12:38:44 UTC (rev 63299)
@@ -0,0 +1,77 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, 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.ejbthree963;
+
+import java.rmi.RemoteException;
+
+import javax.ejb.EJBException;
+import javax.ejb.SessionBean;
+import javax.ejb.SessionContext;
+import javax.ejb.Stateful;
+
+/**
+ * @author carlo
+ *
+ */
+ at Stateful
+public class MyStatefulBean implements MyStateful, SessionBean
+{
+   private static final long serialVersionUID = 1L;
+   
+   private SessionContext ctx;
+   private String name;
+
+   public String sayHi() throws RemoteException
+   {
+      if(ctx == null)
+         throw new IllegalStateException("ctx is null");
+      return "Hi " + name;
+   }
+
+   public void setName(String name) throws RemoteException
+   {
+      this.name = name;
+   }
+
+   // this one is optional
+//   public void ejbCreate() //throws EJBException, RemoteException
+//   {
+//   }
+   
+   public void ejbActivate() //throws EJBException, RemoteException
+   {
+   }
+
+   public void ejbPassivate() //throws EJBException, RemoteException
+   {
+   }
+
+   public void ejbRemove() //throws EJBException, RemoteException
+   {
+   }
+
+   public void setSessionContext(SessionContext ctx) throws EJBException, RemoteException
+   {
+      this.ctx = ctx;
+   }
+
+}

Copied: branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree963/unit (from rev 63054, trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree963/unit)

Deleted: branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree963/unit/NoEjbCreateTestCase.java
===================================================================
--- trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree963/unit/NoEjbCreateTestCase.java	2007-05-15 15:39:39 UTC (rev 63054)
+++ branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree963/unit/NoEjbCreateTestCase.java	2007-06-01 12:38:44 UTC (rev 63299)
@@ -1,60 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2007, 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.ejbthree963.unit;
-
-import javax.rmi.PortableRemoteObject;
-
-import junit.framework.Test;
-
-import org.jboss.ejb3.test.ejbthree963.MyStateful;
-import org.jboss.test.JBossTestCase;
-
-
-/**
- * Test if an EJB 2.1 bean without ejbCreate is properly deployed.
- *
- * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision: $
- */
-public class NoEjbCreateTestCase extends JBossTestCase
-{
-
-   public NoEjbCreateTestCase(String name)
-   {
-      super(name);
-   }
-
-   public void testCreateNoArgs() throws Exception
-   {
-      MyStateful bean = (MyStateful) getInitialContext().lookup("MyStatefulBean");
-      bean.setName("testCreateNoArgs");
-      String expected = "Hi testCreateNoArgs";
-      String actual = bean.sayHi();
-      assertEquals(expected, actual);
-   }
-   
-   public static Test suite() throws Exception
-   {
-      return getDeploySetup(NoEjbCreateTestCase.class, "ejbthree963.jar");
-   }
-
-}

Copied: branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree963/unit/NoEjbCreateTestCase.java (from rev 63054, trunk/ejb3/src/test/org/jboss/ejb3/test/ejbthree963/unit/NoEjbCreateTestCase.java)
===================================================================
--- branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree963/unit/NoEjbCreateTestCase.java	                        (rev 0)
+++ branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/ejbthree963/unit/NoEjbCreateTestCase.java	2007-06-01 12:38:44 UTC (rev 63299)
@@ -0,0 +1,60 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, 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.ejbthree963.unit;
+
+import javax.rmi.PortableRemoteObject;
+
+import junit.framework.Test;
+
+import org.jboss.ejb3.test.ejbthree963.MyStateful;
+import org.jboss.test.JBossTestCase;
+
+
+/**
+ * Test if an EJB 2.1 bean without ejbCreate is properly deployed.
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+public class NoEjbCreateTestCase extends JBossTestCase
+{
+
+   public NoEjbCreateTestCase(String name)
+   {
+      super(name);
+   }
+
+   public void testCreateNoArgs() throws Exception
+   {
+      MyStateful bean = (MyStateful) getInitialContext().lookup("MyStatefulBean");
+      bean.setName("testCreateNoArgs");
+      String expected = "Hi testCreateNoArgs";
+      String actual = bean.sayHi();
+      assertEquals(expected, actual);
+   }
+   
+   public static Test suite() throws Exception
+   {
+      return getDeploySetup(NoEjbCreateTestCase.class, "ejbthree963.jar");
+   }
+
+}




More information about the jboss-cvs-commits mailing list