You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by mn...@apache.org on 2007/04/03 06:19:24 UTC
svn commit: r525022 - in
/incubator/openejb/trunk/openejb3/itests/openejb-itests-client: ./
src/main/java/org/apache/openejb/test/
src/main/java/org/apache/openejb/test/stateful/
src/main/java/org/apache/openejb/test/stateless/
Author: mnour
Date: Mon Apr 2 21:19:21 2007
New Revision: 525022
URL: http://svn.apache.org/viewvc?view=rev&rev=525022
Log:
issue OPENEJB-519: Annotated test clients enablement
http://issues.apache.org/jira/browse/OPENEJB-519
Added:
incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/TestClient.java
incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/AnnotatedFieldInjectionStatefulLocalTestClient.java
incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/AnnotatedFieldInjectionStatefulPojoHomeIntfcTests.java
incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/AnnotatedFieldInjectionStatefulPojoLocalHomeIntfcTests.java
incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/AnnotatedFieldInjectionStatefulTestClient.java
incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/AnnotatedSetterInjectionStatefulLocalTestClient.java
incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/AnnotatedSetterInjectionStatefulPojoHomeIntfcTests.java
incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/AnnotatedSetterInjectionStatefulPojoLocalHomeIntfcTests.java
incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/AnnotatedSetterInjectionStatefulTestClient.java
incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/AnnotatedFieldInjectionStatelessLocalTestClient.java
incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/AnnotatedFieldInjectionStatelessPojoHomeIntfcTests.java
incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/AnnotatedFieldInjectionStatelessPojoLocalHomeIntfcTests.java
incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/AnnotatedFieldInjectionStatelessTestClient.java
incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/AnnotatedSetterInjectionStatelessLocalTestClient.java
incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/AnnotatedSetterInjectionStatelessPojoHomeIntfcTests.java
incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/AnnotatedSetterInjectionStatelessPojoLocalHomeIntfcTests.java
incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/AnnotatedSetterInjectionStatelessTestClient.java
Modified:
incubator/openejb/trunk/openejb3/itests/openejb-itests-client/pom.xml
incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/BasicStatefulLocalTestClient.java
incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/BasicStatefulTestClient.java
incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulLocalTestSuite.java
incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulTestClient.java
incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulTestSuite.java
incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/BasicStatelessLocalTestClient.java
incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/BasicStatelessTestClient.java
incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/StatelessLocalTestSuite.java
incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/StatelessPojoHomeIntfcTests.java
incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/StatelessTestClient.java
incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/StatelessTestSuite.java
Modified: incubator/openejb/trunk/openejb3/itests/openejb-itests-client/pom.xml
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/itests/openejb-itests-client/pom.xml?view=diff&rev=525022&r1=525021&r2=525022
==============================================================================
--- incubator/openejb/trunk/openejb3/itests/openejb-itests-client/pom.xml (original)
+++ incubator/openejb/trunk/openejb3/itests/openejb-itests-client/pom.xml Mon Apr 2 21:19:21 2007
@@ -62,5 +62,9 @@
<version>3.8.1</version>
<scope>compile</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.xbean</groupId>
+ <artifactId>xbean-finder</artifactId>
+ </dependency>
</dependencies>
</project>
Added: incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/TestClient.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/TestClient.java?view=auto&rev=525022
==============================================================================
--- incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/TestClient.java (added)
+++ incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/TestClient.java Mon Apr 2 21:19:21 2007
@@ -0,0 +1,124 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.openejb.test;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.ejb.EJB;
+import javax.ejb.EJBMetaData;
+import javax.ejb.Handle;
+import javax.ejb.HomeHandle;
+import javax.naming.InitialContext;
+import javax.rmi.PortableRemoteObject;
+
+import org.apache.xbean.finder.ClassFinder;
+
+/**
+ *
+ * @author <a href="mailto:david.blevins@visi.com">David Blevins</a>
+ * @author <a href="mailto:Richard@Monson-Haefel.com">Richard Monson-Haefel</a>
+ */
+public abstract class TestClient extends NamedTestCase {
+
+ protected InitialContext initialContext;
+ protected EJBMetaData ejbMetaData;
+ protected HomeHandle ejbHomeHandle;
+ protected Handle ejbHandle;
+ protected Integer ejbPrimaryKey;
+
+ public TestClient(String name){
+ super(name);
+ }
+
+ /**
+ * Sets up the fixture, for example, open a network connection.
+ * This method is called before a test is executed.
+ */
+ protected abstract void setUp() throws Exception;
+
+ protected Object cast(Object object, Class type) {
+ return PortableRemoteObject.narrow(object, type);
+ }
+
+ protected final void processFieldInjections() {
+ Object home = null;
+ ClassFinder finder = null;
+ List<Field> fieldList = null;
+
+ finder = new ClassFinder(getClassPath());
+ fieldList = finder.findAnnotatedFields(EJB.class);
+ for(Iterator fields = fieldList.iterator(); fields.hasNext();) {
+ Field field = (Field) fields.next();
+ EJB ejbAnnotation = field.getAnnotation(EJB.class);
+ if( (ejbAnnotation.name() != null) && (ejbAnnotation.name() != "") && (ejbAnnotation.beanInterface() != null)) {
+ try {
+ home = initialContext.lookup(ejbAnnotation.name());
+ // home = ejbAnnotation.beanInterface().cast(PortableRemoteObject.narrow(home, ejbAnnotation.beanInterface()));
+ home = cast(home, ejbAnnotation.beanInterface());
+ field.setAccessible(true);
+ field.set(this, home);
+ } catch(Exception ex) {
+ // TODO - MNour : Needs better exception handling
+ ex.printStackTrace();
+ }
+ }
+ }
+ }
+
+ protected final void processSetterInjections() {
+ Object home = null;
+ ClassFinder finder = null;
+ List<Method> methodList = null;
+
+ finder = new ClassFinder(getClassPath());
+ methodList = finder.findAnnotatedMethods(EJB.class);
+ for(Iterator methods = methodList.iterator(); methods.hasNext();) {
+ Method method = (Method) methods.next();
+ EJB ejbAnnotation = method.getAnnotation(EJB.class);
+ if( (ejbAnnotation.name() != null) && (ejbAnnotation.name() != "") && (ejbAnnotation.beanInterface() != null)) {
+ try {
+ home = initialContext.lookup(ejbAnnotation.name());
+ // home = ejbAnnotation.beanInterface().cast(PortableRemoteObject.narrow(home, ejbAnnotation.beanInterface()));
+ home = cast(home, ejbAnnotation.beanInterface());
+ method.setAccessible(true);
+ method.invoke(this, new Object[] {home});
+ } catch(Exception ex) {
+ // TODO - MNour : Needs better exception handling
+ ex.printStackTrace();
+ }
+ }
+ }
+ }
+
+ private List<Class> getClassPath() {
+ Class superClass = null;
+ List<Class> classPath = new ArrayList<Class>();
+
+ classPath.add(getClass());
+ superClass = getClass().getSuperclass();
+ while(!superClass.equals(Object.class)) {
+ classPath.add(superClass);
+ superClass = superClass.getSuperclass();
+ }
+ return classPath;
+ }
+
+}
Added: incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/AnnotatedFieldInjectionStatefulLocalTestClient.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/AnnotatedFieldInjectionStatefulLocalTestClient.java?view=auto&rev=525022
==============================================================================
--- incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/AnnotatedFieldInjectionStatefulLocalTestClient.java (added)
+++ incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/AnnotatedFieldInjectionStatefulLocalTestClient.java Mon Apr 2 21:19:21 2007
@@ -0,0 +1,40 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.openejb.test.stateful;
+
+/**
+ * [2] Should be run as the second test suite of the BasicStatelessTestClients
+ *
+ * @author <a href="mailto:david.blevins@visi.com">David Blevins</a>
+ * @author <a href="mailto:Richard@Monson-Haefel.com">Richard Monson-Haefel</a>
+ * @author <a href="mailto:nour.mohammad@gmail.com">Mohammad Nour El-Din</a>
+ *
+ * @version $Rev: 450640 $ $Date: 2006-09-28 01:58:13 +0200 (Thu, 28 Sep 2006) $
+ */
+public abstract class AnnotatedFieldInjectionStatefulLocalTestClient extends BasicStatefulLocalTestClient {
+
+ public AnnotatedFieldInjectionStatefulLocalTestClient(String name) {
+ super("AnnotatedFieldInjectionStatefulLocalTestClient." + name);
+ }
+
+ protected void setUp() throws Exception{
+ super.setUp();
+ processFieldInjections();
+ }
+
+}
+
Added: incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/AnnotatedFieldInjectionStatefulPojoHomeIntfcTests.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/AnnotatedFieldInjectionStatefulPojoHomeIntfcTests.java?view=auto&rev=525022
==============================================================================
--- incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/AnnotatedFieldInjectionStatefulPojoHomeIntfcTests.java (added)
+++ incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/AnnotatedFieldInjectionStatefulPojoHomeIntfcTests.java Mon Apr 2 21:19:21 2007
@@ -0,0 +1,54 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.openejb.test.stateful;
+
+/**
+ * [2] Should be run as the second test suite of the BasicStatelessTestClients
+ *
+ * @author <a href="mailto:david.blevins@visi.com">David Blevins</a>
+ * @author <a href="mailto:Richard@Monson-Haefel.com">Richard Monson-Haefel</a>
+ * @author <a href="mailto:nour.mohammad@gmail.com">Mohammad Nour El-Din</a>
+ *
+ * @version $Rev: 485528 $ $Date: 2006-12-11 08:39:11 +0200 (Mon, 11 Dec 2006) $
+ */
+public class AnnotatedFieldInjectionStatefulPojoHomeIntfcTests extends AnnotatedFieldInjectionStatefulTestClient {
+
+ public AnnotatedFieldInjectionStatefulPojoHomeIntfcTests() {
+ super("AnnotatedFieldInjectionStatefulHomeIntfc.");
+ }
+
+ protected void setUp() throws Exception{
+ super.setUp();
+ }
+
+ //===============================
+ // Test home interface methods
+ //
+ public void test01_create(){
+ try{
+ ejbObject = ejbHome.createObject("BasicStatefulObject");
+ assertNotNull( "The EJBObject is null", ejbObject );
+ } catch (Exception e){
+ fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ }
+ }
+ //
+ // Test home interface methods
+ //===============================
+
+}
+
Added: incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/AnnotatedFieldInjectionStatefulPojoLocalHomeIntfcTests.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/AnnotatedFieldInjectionStatefulPojoLocalHomeIntfcTests.java?view=auto&rev=525022
==============================================================================
--- incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/AnnotatedFieldInjectionStatefulPojoLocalHomeIntfcTests.java (added)
+++ incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/AnnotatedFieldInjectionStatefulPojoLocalHomeIntfcTests.java Mon Apr 2 21:19:21 2007
@@ -0,0 +1,54 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.openejb.test.stateful;
+
+/**
+ * [2] Should be run as the second test suite of the BasicStatelessTestClients
+ *
+ * @author <a href="mailto:david.blevins@visi.com">David Blevins</a>
+ * @author <a href="mailto:Richard@Monson-Haefel.com">Richard Monson-Haefel</a>
+ * @author <a href="mailto:nour.mohammad@gmail.com">Mohammad Nour El-Din</a>
+ *
+ * @version $Rev: 450640 $ $Date: 2006-09-28 01:58:13 +0200 (Thu, 28 Sep 2006) $
+ */
+public class AnnotatedFieldInjectionStatefulPojoLocalHomeIntfcTests extends AnnotatedFieldInjectionStatefulLocalTestClient {
+
+ public AnnotatedFieldInjectionStatefulPojoLocalHomeIntfcTests(){
+ super("AnnotatedFieldInjectionStatefulLocalHomeIntfc.");
+ }
+
+ protected void setUp() throws Exception{
+ super.setUp();
+ }
+
+ //===============================
+ // Test home interface methods
+ //
+ public void test01_create(){
+ try{
+ ejbLocalObject = ejbLocalHome.create("BasicStatefulLocalObject");
+ assertNotNull( "The EJBObject is null", ejbLocalObject );
+ } catch (Exception e){
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
+ }
+ }
+ //
+ // Test home interface methods
+ //===============================
+
+}
+
Added: incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/AnnotatedFieldInjectionStatefulTestClient.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/AnnotatedFieldInjectionStatefulTestClient.java?view=auto&rev=525022
==============================================================================
--- incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/AnnotatedFieldInjectionStatefulTestClient.java (added)
+++ incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/AnnotatedFieldInjectionStatefulTestClient.java Mon Apr 2 21:19:21 2007
@@ -0,0 +1,40 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.openejb.test.stateful;
+
+/**
+ * [2] Should be run as the second test suite of the BasicStatelessTestClients
+ *
+ * @author <a href="mailto:david.blevins@visi.com">David Blevins</a>
+ * @author <a href="mailto:Richard@Monson-Haefel.com">Richard Monson-Haefel</a>
+ * @author <a href="mailto:nour.mohammad@gmail.com">Mohammad Nour El-Din</a>
+ *
+ * @version $Rev: 450640 $ $Date: 2006-09-28 01:58:13 +0200 (Thu, 28 Sep 2006) $
+ */
+public abstract class AnnotatedFieldInjectionStatefulTestClient extends BasicStatefulTestClient {
+
+ public AnnotatedFieldInjectionStatefulTestClient(String name) {
+ super("AnnotatedFieldInjectionStatefulTestClient." + name);
+ }
+
+ protected void setUp() throws Exception{
+ super.setUp();
+ processFieldInjections();
+ }
+
+}
+
Added: incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/AnnotatedSetterInjectionStatefulLocalTestClient.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/AnnotatedSetterInjectionStatefulLocalTestClient.java?view=auto&rev=525022
==============================================================================
--- incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/AnnotatedSetterInjectionStatefulLocalTestClient.java (added)
+++ incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/AnnotatedSetterInjectionStatefulLocalTestClient.java Mon Apr 2 21:19:21 2007
@@ -0,0 +1,40 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.openejb.test.stateful;
+
+/**
+ * [2] Should be run as the second test suite of the BasicStatelessTestClients
+ *
+ * @author <a href="mailto:david.blevins@visi.com">David Blevins</a>
+ * @author <a href="mailto:Richard@Monson-Haefel.com">Richard Monson-Haefel</a>
+ * @author <a href="mailto:nour.mohammad@gmail.com">Mohammad Nour El-Din</a>
+ *
+ * @version $Rev: 450640 $ $Date: 2006-09-28 01:58:13 +0200 (Thu, 28 Sep 2006) $
+ */
+public abstract class AnnotatedSetterInjectionStatefulLocalTestClient extends BasicStatefulLocalTestClient {
+
+ public AnnotatedSetterInjectionStatefulLocalTestClient(String name) {
+ super("AnnotatedSetterInjectionStatefulLocalTestClient." + name);
+ }
+
+ protected void setUp() throws Exception{
+ super.setUp();
+ processSetterInjections();
+ }
+
+}
+
Added: incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/AnnotatedSetterInjectionStatefulPojoHomeIntfcTests.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/AnnotatedSetterInjectionStatefulPojoHomeIntfcTests.java?view=auto&rev=525022
==============================================================================
--- incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/AnnotatedSetterInjectionStatefulPojoHomeIntfcTests.java (added)
+++ incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/AnnotatedSetterInjectionStatefulPojoHomeIntfcTests.java Mon Apr 2 21:19:21 2007
@@ -0,0 +1,63 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.openejb.test.stateful;
+
+import javax.ejb.EJB;
+
+
+/**
+ * [2] Should be run as the second test suite of the BasicStatelessTestClients
+ *
+ * @author <a href="mailto:david.blevins@visi.com">David Blevins</a>
+ * @author <a href="mailto:Richard@Monson-Haefel.com">Richard Monson-Haefel</a>
+ * @author <a href="mailto:nour.mohammad@gmail.com">Mohammad Nour El-Din</a>
+ *
+ * @version $Rev: 485528 $ $Date: 2006-12-11 08:39:11 +0200 (Mon, 11 Dec 2006) $
+ */
+public class AnnotatedSetterInjectionStatefulPojoHomeIntfcTests extends AnnotatedSetterInjectionStatefulTestClient {
+
+ public AnnotatedSetterInjectionStatefulPojoHomeIntfcTests() {
+ super("AnnotatedSetterInjectionStatefulHomeIntfc.");
+ }
+
+ protected void setUp() throws Exception{
+ super.setUp();
+ }
+
+ @EJB(name="client/tests/stateful/BasicStatefulPojoHome",
+ beanInterface=BasicStatefulHome.class)
+ public void setEjbHome(BasicStatefulHome bsEjbHome) {
+ ejbHome = bsEjbHome;
+ }
+
+ //===============================
+ // Test home interface methods
+ //
+ public void test01_create(){
+ try{
+ ejbObject = ejbHome.createObject("BasicStatefulObject");
+ assertNotNull( "The EJBObject is null", ejbObject );
+ } catch (Exception e){
+ fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ }
+ }
+ //
+ // Test home interface methods
+ //===============================
+
+}
+
Added: incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/AnnotatedSetterInjectionStatefulPojoLocalHomeIntfcTests.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/AnnotatedSetterInjectionStatefulPojoLocalHomeIntfcTests.java?view=auto&rev=525022
==============================================================================
--- incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/AnnotatedSetterInjectionStatefulPojoLocalHomeIntfcTests.java (added)
+++ incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/AnnotatedSetterInjectionStatefulPojoLocalHomeIntfcTests.java Mon Apr 2 21:19:21 2007
@@ -0,0 +1,63 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.openejb.test.stateful;
+
+import javax.ejb.EJB;
+
+
+/**
+ * [2] Should be run as the second test suite of the BasicStatelessTestClients
+ *
+ * @author <a href="mailto:david.blevins@visi.com">David Blevins</a>
+ * @author <a href="mailto:Richard@Monson-Haefel.com">Richard Monson-Haefel</a>
+ * @author <a href="mailto:nour.mohammad@gmail.com">Mohammad Nour El-Din</a>
+ *
+ * @version $Rev: 450640 $ $Date: 2006-09-28 01:58:13 +0200 (Thu, 28 Sep 2006) $
+ */
+public class AnnotatedSetterInjectionStatefulPojoLocalHomeIntfcTests extends AnnotatedSetterInjectionStatefulLocalTestClient {
+
+ public AnnotatedSetterInjectionStatefulPojoLocalHomeIntfcTests(){
+ super("AnnotatedSetterInjectionStatefulLocalHomeIntfc.");
+ }
+
+ protected void setUp() throws Exception{
+ super.setUp();
+ }
+
+ @EJB(name="client/tests/stateful/BasicStatefulPojoHomeLocal",
+ beanInterface = BasicStatefulLocalHome.class)
+ public void setEjbLocalHome(BasicStatefulLocalHome bslEjbHome) {
+ ejbLocalHome = bslEjbHome;
+ }
+
+ //===============================
+ // Test home interface methods
+ //
+ public void test01_create(){
+ try{
+ ejbLocalObject = ejbLocalHome.create("BasicStatefulLocalObject");
+ assertNotNull( "The EJBObject is null", ejbLocalObject );
+ } catch (Exception e){
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
+ }
+ }
+ //
+ // Test home interface methods
+ //===============================
+
+}
+
Added: incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/AnnotatedSetterInjectionStatefulTestClient.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/AnnotatedSetterInjectionStatefulTestClient.java?view=auto&rev=525022
==============================================================================
--- incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/AnnotatedSetterInjectionStatefulTestClient.java (added)
+++ incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/AnnotatedSetterInjectionStatefulTestClient.java Mon Apr 2 21:19:21 2007
@@ -0,0 +1,40 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.openejb.test.stateful;
+
+/**
+ * [2] Should be run as the second test suite of the BasicStatelessTestClients
+ *
+ * @author <a href="mailto:david.blevins@visi.com">David Blevins</a>
+ * @author <a href="mailto:Richard@Monson-Haefel.com">Richard Monson-Haefel</a>
+ * @author <a href="mailto:nour.mohammad@gmail.com">Mohammad Nour El-Din</a>
+ *
+ * @version $Rev: 450640 $ $Date: 2006-09-28 01:58:13 +0200 (Thu, 28 Sep 2006) $
+ */
+public abstract class AnnotatedSetterInjectionStatefulTestClient extends BasicStatefulTestClient {
+
+ public AnnotatedSetterInjectionStatefulTestClient(String name) {
+ super("AnnotatedSetterInjectionStatefulTestClient." + name);
+ }
+
+ protected void setUp() throws Exception{
+ super.setUp();
+ processSetterInjections();
+ }
+
+}
+
Modified: incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/BasicStatefulLocalTestClient.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/BasicStatefulLocalTestClient.java?view=diff&rev=525022&r1=525021&r2=525022
==============================================================================
--- incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/BasicStatefulLocalTestClient.java (original)
+++ incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/BasicStatefulLocalTestClient.java Mon Apr 2 21:19:21 2007
@@ -16,6 +16,8 @@
*/
package org.apache.openejb.test.stateful;
+import javax.ejb.EJB;
+
/**
* @author <a href="mailto:david.blevins@visi.com">David Blevins</a>
* @author <a href="mailto:Richard@Monson-Haefel.com">Richard Monson-Haefel</a>
@@ -24,11 +26,14 @@
*/
public abstract class BasicStatefulLocalTestClient extends StatefulTestClient {
- protected BasicStatefulLocalHome ejbLocalHome;
- protected BasicStatefulLocalObject ejbLocalObject;
+ @EJB(name="client/tests/stateful/BasicStatefulPojoHomeLocal",
+ beanInterface = BasicStatefulLocalHome.class)
+ protected BasicStatefulLocalHome ejbLocalHome = null;
+ protected BasicStatefulLocalObject ejbLocalObject = null;
public BasicStatefulLocalTestClient(String name){
super(name);
}
}
+
Modified: incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/BasicStatefulTestClient.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/BasicStatefulTestClient.java?view=diff&rev=525022&r1=525021&r2=525022
==============================================================================
--- incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/BasicStatefulTestClient.java (original)
+++ incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/BasicStatefulTestClient.java Mon Apr 2 21:19:21 2007
@@ -16,6 +16,8 @@
*/
package org.apache.openejb.test.stateful;
+import javax.ejb.EJB;
+
/**
*
* @author <a href="mailto:david.blevins@visi.com">David Blevins</a>
@@ -25,11 +27,14 @@
*/
public abstract class BasicStatefulTestClient extends StatefulTestClient {
- protected BasicStatefulHome ejbHome;
- protected BasicStatefulObject ejbObject;
+ @EJB(name="client/tests/stateful/BasicStatefulPojoHome",
+ beanInterface=BasicStatefulHome.class)
+ protected BasicStatefulHome ejbHome = null;
+ protected BasicStatefulObject ejbObject = null;
public BasicStatefulTestClient(String name){
super(name);
}
}
+
Modified: incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulLocalTestSuite.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulLocalTestSuite.java?view=diff&rev=525022&r1=525021&r2=525022
==============================================================================
--- incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulLocalTestSuite.java (original)
+++ incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulLocalTestSuite.java Mon Apr 2 21:19:21 2007
@@ -16,6 +16,9 @@
*/
package org.apache.openejb.test.stateful;
+import org.apache.openejb.test.stateless.AnnotatedFieldInjectionStatelessPojoLocalHomeIntfcTests;
+import org.apache.openejb.test.stateless.AnnotatedSetterInjectionStatelessPojoLocalHomeIntfcTests;
+
import junit.framework.Test;
import junit.framework.TestSuite;
@@ -49,15 +52,26 @@
suite.addTest(new StatefulHandleTests());
suite.addTest(new StatefulEjbMetaDataTests());
suite.addTest(new StatefulBeanTxTests());
- //suite.addTest(new StatefulAllowedOperationsTests());
- //suite.addTest(new BMTStatefulAllowedOperationsTests());
+ // suite.addTest(new StatefulAllowedOperationsTests());
+ // suite.addTest(new BMTStatefulAllowedOperationsTests());
suite.addTest(new StatefulJndiEncTests());
suite.addTest(new StatefulContextLookupTests());
suite.addTest(new StatefulPojoContextLookupTests());
suite.addTest(new StatefulFieldInjectionTests());
suite.addTest(new StatefulSetterInjectionTests());
-// suite.addTest(new StatefulPersistenceContextTests());
+ // suite.addTest(new StatefulPersistenceContextTests());
suite.addTest(new StatefulRmiIiopTests());
+
+ /*///////////////////////////
+ * Annotated test clients
+ *///////////////////////////
+
+ // Annotated field injection test clients
+ suite.addTest(new AnnotatedFieldInjectionStatefulPojoLocalHomeIntfcTests());
+
+ // Annotated setter injection test clients
+ suite.addTest(new AnnotatedSetterInjectionStatelessPojoLocalHomeIntfcTests());
+
/* TO DO
suite.addTest(new StatefulEjbContextTests());
suite.addTest(new BMTStatefulEjbContextTests());
Modified: incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulTestClient.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulTestClient.java?view=diff&rev=525022&r1=525021&r2=525022
==============================================================================
--- incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulTestClient.java (original)
+++ incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulTestClient.java Mon Apr 2 21:19:21 2007
@@ -18,12 +18,10 @@
import java.util.Properties;
-import javax.ejb.EJBMetaData;
-import javax.ejb.Handle;
-import javax.ejb.HomeHandle;
import javax.naming.Context;
import javax.naming.InitialContext;
+import org.apache.openejb.test.TestClient;
import org.apache.openejb.test.TestManager;
/**
@@ -31,15 +29,8 @@
* @author <a href="mailto:david.blevins@visi.com">David Blevins</a>
* @author <a href="mailto:Richard@Monson-Haefel.com">Richard Monson-Haefel</a>
*/
-public abstract class StatefulTestClient extends org.apache.openejb.test.NamedTestCase{
+public abstract class StatefulTestClient extends TestClient {
- protected InitialContext initialContext;
-
- protected EJBMetaData ejbMetaData;
- protected HomeHandle ejbHomeHandle;
- protected Handle ejbHandle;
- protected Integer ejbPrimaryKey;
-
public StatefulTestClient(String name){
super("Stateful."+name);
}
@@ -56,5 +47,5 @@
initialContext = new InitialContext(properties);
}
-
+
}
Modified: incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulTestSuite.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulTestSuite.java?view=diff&rev=525022&r1=525021&r2=525022
==============================================================================
--- incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulTestSuite.java (original)
+++ incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateful/StatefulTestSuite.java Mon Apr 2 21:19:21 2007
@@ -16,6 +16,9 @@
*/
package org.apache.openejb.test.stateful;
+import org.apache.openejb.test.stateless.AnnotatedFieldInjectionStatelessPojoHomeIntfcTests;
+import org.apache.openejb.test.stateless.AnnotatedSetterInjectionStatelessPojoHomeIntfcTests;
+
import junit.framework.Test;
import junit.framework.TestSuite;
@@ -48,15 +51,26 @@
suite.addTest(new StatefulPojoHandleTests());
suite.addTest(new StatefulEjbMetaDataTests());
// suite.addTest(new StatefulBeanTxTests());
- //suite.addTest(new StatefulAllowedOperationsTests());
- //suite.addTest(new BMTStatefulAllowedOperationsTests());
+ // suite.addTest(new StatefulAllowedOperationsTests());
+ // suite.addTest(new BMTStatefulAllowedOperationsTests());
suite.addTest(new StatefulJndiEncTests());
suite.addTest(new StatefulContextLookupTests());
suite.addTest(new StatefulPojoContextLookupTests());
suite.addTest(new StatefulFieldInjectionTests());
suite.addTest(new StatefulSetterInjectionTests());
-// suite.addTest(new StatefulPersistenceContextTests());
+ // suite.addTest(new StatefulPersistenceContextTests());
suite.addTest(new StatefulRmiIiopTests());
+
+ /*///////////////////////////
+ * Annotated test clients
+ *///////////////////////////
+
+ // Annotated field injection test clients
+ suite.addTest(new AnnotatedFieldInjectionStatefulPojoHomeIntfcTests());
+
+ // Annotated setter injection test clients
+ suite.addTest(new AnnotatedSetterInjectionStatefulPojoHomeIntfcTests());
+
/* TO DO
suite.addTest(new StatefulEjbContextTests());
suite.addTest(new BMTStatefulEjbContextTests());
Added: incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/AnnotatedFieldInjectionStatelessLocalTestClient.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/AnnotatedFieldInjectionStatelessLocalTestClient.java?view=auto&rev=525022
==============================================================================
--- incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/AnnotatedFieldInjectionStatelessLocalTestClient.java (added)
+++ incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/AnnotatedFieldInjectionStatelessLocalTestClient.java Mon Apr 2 21:19:21 2007
@@ -0,0 +1,40 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.openejb.test.stateless;
+
+/**
+ * [2] Should be run as the second test suite of the BasicStatelessTestClients
+ *
+ * @author <a href="mailto:david.blevins@visi.com">David Blevins</a>
+ * @author <a href="mailto:Richard@Monson-Haefel.com">Richard Monson-Haefel</a>
+ * @author <a href="mailto:nour.mohammad@gmail.com">Mohammad Nour El-Din</a>
+ *
+ * @version $Rev: 450640 $ $Date: 2006-09-28 01:58:13 +0200 (Thu, 28 Sep 2006) $
+ */
+public abstract class AnnotatedFieldInjectionStatelessLocalTestClient extends BasicStatelessLocalTestClient {
+
+ public AnnotatedFieldInjectionStatelessLocalTestClient(String name) {
+ super("AnnotatedFieldInjectionStatelessLocalTestClient." + name);
+ }
+
+ protected void setUp() throws Exception{
+ super.setUp();
+ processFieldInjections();
+ }
+
+}
+
Added: incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/AnnotatedFieldInjectionStatelessPojoHomeIntfcTests.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/AnnotatedFieldInjectionStatelessPojoHomeIntfcTests.java?view=auto&rev=525022
==============================================================================
--- incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/AnnotatedFieldInjectionStatelessPojoHomeIntfcTests.java (added)
+++ incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/AnnotatedFieldInjectionStatelessPojoHomeIntfcTests.java Mon Apr 2 21:19:21 2007
@@ -0,0 +1,57 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.openejb.test.stateless;
+
+import javax.ejb.EJB;
+
+
+/**
+ * [2] Should be run as the second test suite of the BasicStatelessTestClients
+ *
+ * @author <a href="mailto:david.blevins@visi.com">David Blevins</a>
+ * @author <a href="mailto:Richard@Monson-Haefel.com">Richard Monson-Haefel</a>
+ * @author <a href="mailto:nour.mohammad@gmail.com">Mohammad Nour El-Din</a>
+ *
+ * @version $Rev: 485528 $ $Date: 2006-12-11 08:39:11 +0200 (Mon, 11 Dec 2006) $
+ */
+public class AnnotatedFieldInjectionStatelessPojoHomeIntfcTests extends AnnotatedFieldInjectionStatelessTestClient {
+
+ public AnnotatedFieldInjectionStatelessPojoHomeIntfcTests() {
+ super("AnnotatedFieldInjectionStatelessHomeIntfc.");
+ }
+
+ protected void setUp() throws Exception{
+ super.setUp();
+ }
+
+ //===============================
+ // Test home interface methods
+ //
+ public void test01_create(){
+ try{
+ ejbObject = ejbHome.createObject();
+ assertNotNull( "The EJBObject is null", ejbObject );
+ } catch (Exception e){
+ fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ }
+ }
+ //
+ // Test home interface methods
+ //===============================
+
+}
+
Added: incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/AnnotatedFieldInjectionStatelessPojoLocalHomeIntfcTests.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/AnnotatedFieldInjectionStatelessPojoLocalHomeIntfcTests.java?view=auto&rev=525022
==============================================================================
--- incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/AnnotatedFieldInjectionStatelessPojoLocalHomeIntfcTests.java (added)
+++ incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/AnnotatedFieldInjectionStatelessPojoLocalHomeIntfcTests.java Mon Apr 2 21:19:21 2007
@@ -0,0 +1,57 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.openejb.test.stateless;
+
+import javax.ejb.EJB;
+
+
+/**
+ * [2] Should be run as the second test suite of the BasicStatelessTestClients
+ *
+ * @author <a href="mailto:david.blevins@visi.com">David Blevins</a>
+ * @author <a href="mailto:Richard@Monson-Haefel.com">Richard Monson-Haefel</a>
+ * @author <a href="mailto:nour.mohammad@gmail.com">Mohammad Nour El-Din</a>
+ *
+ * @version $Rev: 450640 $ $Date: 2006-09-28 01:58:13 +0200 (Thu, 28 Sep 2006) $
+ */
+public class AnnotatedFieldInjectionStatelessPojoLocalHomeIntfcTests extends AnnotatedFieldInjectionStatelessLocalTestClient {
+
+ public AnnotatedFieldInjectionStatelessPojoLocalHomeIntfcTests(){
+ super("AnnotatedFieldInjectionStatelessLocalHomeIntfc.");
+ }
+
+ protected void setUp() throws Exception{
+ super.setUp();
+ }
+
+ //===============================
+ // Test home interface methods
+ //
+ public void test01_create(){
+ try{
+ ejbLocalObject = ejbLocalHome.create();
+ assertNotNull( "The EJBObject is null", ejbLocalObject );
+ } catch (Exception e){
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
+ }
+ }
+ //
+ // Test home interface methods
+ //===============================
+
+}
+
Added: incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/AnnotatedFieldInjectionStatelessTestClient.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/AnnotatedFieldInjectionStatelessTestClient.java?view=auto&rev=525022
==============================================================================
--- incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/AnnotatedFieldInjectionStatelessTestClient.java (added)
+++ incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/AnnotatedFieldInjectionStatelessTestClient.java Mon Apr 2 21:19:21 2007
@@ -0,0 +1,40 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.openejb.test.stateless;
+
+/**
+ * [2] Should be run as the second test suite of the BasicStatelessTestClients
+ *
+ * @author <a href="mailto:david.blevins@visi.com">David Blevins</a>
+ * @author <a href="mailto:Richard@Monson-Haefel.com">Richard Monson-Haefel</a>
+ * @author <a href="mailto:nour.mohammad@gmail.com">Mohammad Nour El-Din</a>
+ *
+ * @version $Rev: 450640 $ $Date: 2006-09-28 01:58:13 +0200 (Thu, 28 Sep 2006) $
+ */
+public abstract class AnnotatedFieldInjectionStatelessTestClient extends BasicStatelessTestClient {
+
+ public AnnotatedFieldInjectionStatelessTestClient(String name) {
+ super("AnnotatedFieldInjectionStatelessTestClient." + name);
+ }
+
+ protected void setUp() throws Exception{
+ super.setUp();
+ processFieldInjections();
+ }
+
+}
+
Added: incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/AnnotatedSetterInjectionStatelessLocalTestClient.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/AnnotatedSetterInjectionStatelessLocalTestClient.java?view=auto&rev=525022
==============================================================================
--- incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/AnnotatedSetterInjectionStatelessLocalTestClient.java (added)
+++ incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/AnnotatedSetterInjectionStatelessLocalTestClient.java Mon Apr 2 21:19:21 2007
@@ -0,0 +1,40 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.openejb.test.stateless;
+
+/**
+ * [2] Should be run as the second test suite of the BasicStatelessTestClients
+ *
+ * @author <a href="mailto:david.blevins@visi.com">David Blevins</a>
+ * @author <a href="mailto:Richard@Monson-Haefel.com">Richard Monson-Haefel</a>
+ * @author <a href="mailto:nour.mohammad@gmail.com">Mohammad Nour El-Din</a>
+ *
+ * @version $Rev: 450640 $ $Date: 2006-09-28 01:58:13 +0200 (Thu, 28 Sep 2006) $
+ */
+public abstract class AnnotatedSetterInjectionStatelessLocalTestClient extends BasicStatelessLocalTestClient {
+
+ public AnnotatedSetterInjectionStatelessLocalTestClient(String name) {
+ super("AnnotatedSetterInjectionStatelessLocalTestClient." + name);
+ }
+
+ protected void setUp() throws Exception{
+ super.setUp();
+ processSetterInjections();
+ }
+
+}
+
Added: incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/AnnotatedSetterInjectionStatelessPojoHomeIntfcTests.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/AnnotatedSetterInjectionStatelessPojoHomeIntfcTests.java?view=auto&rev=525022
==============================================================================
--- incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/AnnotatedSetterInjectionStatelessPojoHomeIntfcTests.java (added)
+++ incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/AnnotatedSetterInjectionStatelessPojoHomeIntfcTests.java Mon Apr 2 21:19:21 2007
@@ -0,0 +1,63 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.openejb.test.stateless;
+
+import javax.ejb.EJB;
+
+
+/**
+ * [2] Should be run as the second test suite of the BasicStatelessTestClients
+ *
+ * @author <a href="mailto:david.blevins@visi.com">David Blevins</a>
+ * @author <a href="mailto:Richard@Monson-Haefel.com">Richard Monson-Haefel</a>
+ * @author <a href="mailto:nour.mohammad@gmail.com">Mohammad Nour El-Din</a>
+ *
+ * @version $Rev: 485528 $ $Date: 2006-12-11 08:39:11 +0200 (Mon, 11 Dec 2006) $
+ */
+public class AnnotatedSetterInjectionStatelessPojoHomeIntfcTests extends AnnotatedSetterInjectionStatelessTestClient {
+
+ public AnnotatedSetterInjectionStatelessPojoHomeIntfcTests() {
+ super("AnnotatedSetterInjectionStatelessHomeIntfc.");
+ }
+
+ protected void setUp() throws Exception{
+ super.setUp();
+ }
+
+ @EJB(name="client/tests/stateless/BasicStatelessPojoHome",
+ beanInterface=BasicStatelessHome.class)
+ public void setEjbHome(BasicStatelessHome bsEjbHome) {
+ ejbHome = bsEjbHome;
+ }
+
+ //===============================
+ // Test home interface methods
+ //
+ public void test01_create(){
+ try{
+ ejbObject = ejbHome.createObject();
+ assertNotNull( "The EJBObject is null", ejbObject );
+ } catch (Exception e){
+ fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ }
+ }
+ //
+ // Test home interface methods
+ //===============================
+
+}
+
Added: incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/AnnotatedSetterInjectionStatelessPojoLocalHomeIntfcTests.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/AnnotatedSetterInjectionStatelessPojoLocalHomeIntfcTests.java?view=auto&rev=525022
==============================================================================
--- incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/AnnotatedSetterInjectionStatelessPojoLocalHomeIntfcTests.java (added)
+++ incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/AnnotatedSetterInjectionStatelessPojoLocalHomeIntfcTests.java Mon Apr 2 21:19:21 2007
@@ -0,0 +1,63 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.openejb.test.stateless;
+
+import javax.ejb.EJB;
+
+
+/**
+ * [2] Should be run as the second test suite of the BasicStatelessTestClients
+ *
+ * @author <a href="mailto:david.blevins@visi.com">David Blevins</a>
+ * @author <a href="mailto:Richard@Monson-Haefel.com">Richard Monson-Haefel</a>
+ * @author <a href="mailto:nour.mohammad@gmail.com">Mohammad Nour El-Din</a>
+ *
+ * @version $Rev: 450640 $ $Date: 2006-09-28 01:58:13 +0200 (Thu, 28 Sep 2006) $
+ */
+public class AnnotatedSetterInjectionStatelessPojoLocalHomeIntfcTests extends AnnotatedSetterInjectionStatelessLocalTestClient {
+
+ public AnnotatedSetterInjectionStatelessPojoLocalHomeIntfcTests(){
+ super("AnnotatedSetterInjectionLocalHomeIntfc.");
+ }
+
+ protected void setUp() throws Exception{
+ super.setUp();
+ }
+
+ @EJB(name="client/tests/stateless/BasicStatelessPojoHomeLocal",
+ beanInterface = BasicStatelessLocalHome.class)
+ public void setEjbLocalHome(BasicStatelessLocalHome bslEjbHome) {
+ ejbLocalHome = bslEjbHome;
+ }
+
+ //===============================
+ // Test home interface methods
+ //
+ public void test01_create(){
+ try{
+ ejbLocalObject = ejbLocalHome.create();
+ assertNotNull( "The EJBObject is null", ejbLocalObject );
+ } catch (Exception e){
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
+ }
+ }
+ //
+ // Test home interface methods
+ //===============================
+
+}
+
Added: incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/AnnotatedSetterInjectionStatelessTestClient.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/AnnotatedSetterInjectionStatelessTestClient.java?view=auto&rev=525022
==============================================================================
--- incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/AnnotatedSetterInjectionStatelessTestClient.java (added)
+++ incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/AnnotatedSetterInjectionStatelessTestClient.java Mon Apr 2 21:19:21 2007
@@ -0,0 +1,40 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.openejb.test.stateless;
+
+/**
+ * [2] Should be run as the second test suite of the BasicStatelessTestClients
+ *
+ * @author <a href="mailto:david.blevins@visi.com">David Blevins</a>
+ * @author <a href="mailto:Richard@Monson-Haefel.com">Richard Monson-Haefel</a>
+ * @author <a href="mailto:nour.mohammad@gmail.com">Mohammad Nour El-Din</a>
+ *
+ * @version $Rev: 450640 $ $Date: 2006-09-28 01:58:13 +0200 (Thu, 28 Sep 2006) $
+ */
+public abstract class AnnotatedSetterInjectionStatelessTestClient extends BasicStatelessTestClient {
+
+ public AnnotatedSetterInjectionStatelessTestClient(String name) {
+ super("AnnotatedSetterInjectionStatelessTestClient." + name);
+ }
+
+ protected void setUp() throws Exception{
+ super.setUp();
+ processSetterInjections();
+ }
+
+}
+
Modified: incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/BasicStatelessLocalTestClient.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/BasicStatelessLocalTestClient.java?view=diff&rev=525022&r1=525021&r2=525022
==============================================================================
--- incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/BasicStatelessLocalTestClient.java (original)
+++ incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/BasicStatelessLocalTestClient.java Mon Apr 2 21:19:21 2007
@@ -16,6 +16,8 @@
*/
package org.apache.openejb.test.stateless;
+import javax.ejb.EJB;
+
/**
* @author <a href="mailto:david.blevins@visi.com">David Blevins</a>
* @author <a href="mailto:Richard@Monson-Haefel.com">Richard Monson-Haefel</a>
@@ -25,11 +27,19 @@
*/
public abstract class BasicStatelessLocalTestClient extends StatelessTestClient {
- protected BasicStatelessLocalHome ejbLocalHome;
- protected BasicStatelessLocalObject ejbLocalObject;
+ @EJB(name="client/tests/stateless/BasicStatelessPojoHomeLocal",
+ beanInterface = BasicStatelessLocalHome.class)
+ protected BasicStatelessLocalHome ejbLocalHome = null;
+ protected BasicStatelessLocalObject ejbLocalObject = null;
public BasicStatelessLocalTestClient(String name){
super(name);
}
+
+ protected Object cast(Object object, Class type) {
+ return type.cast(object);
+ }
+
}
+
Modified: incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/BasicStatelessTestClient.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/BasicStatelessTestClient.java?view=diff&rev=525022&r1=525021&r2=525022
==============================================================================
--- incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/BasicStatelessTestClient.java (original)
+++ incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/BasicStatelessTestClient.java Mon Apr 2 21:19:21 2007
@@ -16,6 +16,8 @@
*/
package org.apache.openejb.test.stateless;
+import javax.ejb.EJB;
+
/**
*
* @author <a href="mailto:david.blevins@visi.com">David Blevins</a>
@@ -23,11 +25,14 @@
*/
public abstract class BasicStatelessTestClient extends StatelessTestClient{
- protected BasicStatelessHome ejbHome;
- protected BasicStatelessObject ejbObject;
+ @EJB(name="client/tests/stateless/BasicStatelessPojoHome",
+ beanInterface=BasicStatelessHome.class)
+ protected BasicStatelessHome ejbHome = null;
+ protected BasicStatelessObject ejbObject = null;
public BasicStatelessTestClient(String name){
super(name);
}
}
+
Modified: incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/StatelessLocalTestSuite.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/StatelessLocalTestSuite.java?view=diff&rev=525022&r1=525021&r2=525022
==============================================================================
--- incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/StatelessLocalTestSuite.java (original)
+++ incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/StatelessLocalTestSuite.java Mon Apr 2 21:19:21 2007
@@ -64,6 +64,17 @@
suite.addTest(new StatelessAnnotatedFieldInjectionTests());
suite.addTest(new StatelessRmiIiopTests());
suite.addTest(new MiscEjbTests());
+
+ /*///////////////////////////
+ * Annotated test clients
+ *///////////////////////////
+
+ // Annotated field injection test clients
+ suite.addTest(new AnnotatedFieldInjectionStatelessPojoLocalHomeIntfcTests());
+
+ // Annotated setter injection test clients
+ suite.addTest(new AnnotatedSetterInjectionStatelessPojoLocalHomeIntfcTests());
+
/* TO DO
suite.addTest(new StatelessEjbContextTests());
suite.addTest(new BMTStatelessEjbContextTests());
Modified: incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/StatelessPojoHomeIntfcTests.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/StatelessPojoHomeIntfcTests.java?view=diff&rev=525022&r1=525021&r2=525022
==============================================================================
--- incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/StatelessPojoHomeIntfcTests.java (original)
+++ incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/StatelessPojoHomeIntfcTests.java Mon Apr 2 21:19:21 2007
@@ -35,7 +35,7 @@
protected void setUp() throws Exception{
super.setUp();
Object obj = initialContext.lookup("client/tests/stateless/BasicStatelessPojoHome");
- ejbHome = (BasicStatelessHome)javax.rmi.PortableRemoteObject.narrow( obj, BasicStatelessHome.class);
+ ejbHome = (BasicStatelessHome) javax.rmi.PortableRemoteObject.narrow( obj, BasicStatelessHome.class);
}
//===============================
@@ -46,7 +46,7 @@
ejbObject = ejbHome.createObject();
assertNotNull( "The EJBObject is null", ejbObject );
} catch (Exception e){
- fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
+ fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
//
@@ -54,4 +54,5 @@
//===============================
}
+
Modified: incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/StatelessTestClient.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/StatelessTestClient.java?view=diff&rev=525022&r1=525021&r2=525022
==============================================================================
--- incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/StatelessTestClient.java (original)
+++ incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/StatelessTestClient.java Mon Apr 2 21:19:21 2007
@@ -16,31 +16,26 @@
*/
package org.apache.openejb.test.stateless;
+import java.lang.reflect.Field;
+import java.util.Iterator;
+import java.util.List;
import java.util.Properties;
-import javax.ejb.EJBMetaData;
-import javax.ejb.Handle;
-import javax.ejb.HomeHandle;
+import javax.ejb.EJB;
import javax.naming.InitialContext;
+import javax.rmi.PortableRemoteObject;
+import org.apache.openejb.test.TestClient;
import org.apache.openejb.test.TestManager;
+import org.apache.xbean.finder.ClassFinder;
/**
*
* @author <a href="mailto:david.blevins@visi.com">David Blevins</a>
* @author <a href="mailto:Richard@Monson-Haefel.com">Richard Monson-Haefel</a>
*/
-public abstract class StatelessTestClient extends org.apache.openejb.test.NamedTestCase{
+public abstract class StatelessTestClient extends TestClient {
- protected InitialContext initialContext;
-
- protected BasicStatelessHome ejbHome;
- protected BasicStatelessObject ejbObject;
- protected EJBMetaData ejbMetaData;
- protected HomeHandle ejbHomeHandle;
- protected Handle ejbHandle;
- protected Integer ejbPrimaryKey;
-
public StatelessTestClient(String name){
super("Stateless."+name);
}
@@ -54,7 +49,6 @@
Properties properties = TestManager.getServer().getContextEnvironment();
//properties.put(Context.SECURITY_PRINCIPAL, "STATELESS_test00_CLIENT");
//properties.put(Context.SECURITY_CREDENTIALS, toString() );
-
initialContext = new InitialContext(properties);
}
Modified: incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/StatelessTestSuite.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/StatelessTestSuite.java?view=diff&rev=525022&r1=525021&r2=525022
==============================================================================
--- incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/StatelessTestSuite.java (original)
+++ incubator/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/StatelessTestSuite.java Mon Apr 2 21:19:21 2007
@@ -82,7 +82,17 @@
suite.addTest(new StatelessRmiIiopTests());
suite.addTest(new MiscEjbTests());
-
+
+ /*///////////////////////////
+ * Annotated test clients
+ *///////////////////////////
+
+ // Annotated field injection test clients
+ suite.addTest(new AnnotatedFieldInjectionStatelessPojoHomeIntfcTests());
+
+ // Annotated setter injection test clients
+ suite.addTest(new AnnotatedSetterInjectionStatelessPojoHomeIntfcTests());
+
/* TO DO
suite.addTest(new StatelessEjbContextTests());
suite.addTest(new BMTStatelessEjbContextTests());
Re: svn commit: r525022 - in /incubator/openejb/trunk/openejb3/itests/openejb-itests-client: ./ src/main/java/org/apache/o...
Posted by David Blevins <da...@visi.com>.
LOL! That's awesome!
-David
On Apr 7, 2007, at 10:03 PM, Mohammad Nour El-Din wrote:
> Done :), but don't laugh at me :), see
> http://people.apache.org/~mnour/images/my_frst_cmt.jpg
>
> On 4/6/07, David Blevins <da...@visi.com> wrote:
>>
>> I don't think attachments work in general.
>>
>> But you could upload it to your public_html dir on
>> people.apache.org. Just
>>
>> scp yourpic.jpg mnour@people.apache.org:public_html/
>>
>> Then browse to:
>>
>> http://people.apache.org/~mnour/yourpic.jpg
>>
>> -David
>>
>>
>> On Apr 5, 2007, at 1:30 PM, Jacek Laskowski wrote:
>>
>> > On 4/5/07, Mohammad Nour El-Din <no...@gmail.com> wrote:
>> >> Hi Jacek it is attached to the mail. U can't see it ?
>> >
>> > No, I can't. Don't worry - it seems that it's not for me to look at
>> > this time.
>> >
>> > Jacek
>> >
>> > --
>> > Jacek Laskowski
>> > http://www.JacekLaskowski.pl
>> >
>>
>>
>
>
> --
> Thanks
> - Mohammad Nour
Re: svn commit: r525022 - in /incubator/openejb/trunk/openejb3/itests/openejb-itests-client: ./ src/main/java/org/apache/o...
Posted by Mohammad Nour El-Din <no...@gmail.com>.
Done :), but don't laugh at me :), see
http://people.apache.org/~mnour/images/my_frst_cmt.jpg
On 4/6/07, David Blevins <da...@visi.com> wrote:
>
> I don't think attachments work in general.
>
> But you could upload it to your public_html dir on
> people.apache.org. Just
>
> scp yourpic.jpg mnour@people.apache.org:public_html/
>
> Then browse to:
>
> http://people.apache.org/~mnour/yourpic.jpg
>
> -David
>
>
> On Apr 5, 2007, at 1:30 PM, Jacek Laskowski wrote:
>
> > On 4/5/07, Mohammad Nour El-Din <no...@gmail.com> wrote:
> >> Hi Jacek it is attached to the mail. U can't see it ?
> >
> > No, I can't. Don't worry - it seems that it's not for me to look at
> > this time.
> >
> > Jacek
> >
> > --
> > Jacek Laskowski
> > http://www.JacekLaskowski.pl
> >
>
>
--
Thanks
- Mohammad Nour
Re: svn commit: r525022 - in /incubator/openejb/trunk/openejb3/itests/openejb-itests-client: ./ src/main/java/org/apache/o...
Posted by David Blevins <da...@visi.com>.
I don't think attachments work in general.
But you could upload it to your public_html dir on
people.apache.org. Just
scp yourpic.jpg mnour@people.apache.org:public_html/
Then browse to:
http://people.apache.org/~mnour/yourpic.jpg
-David
On Apr 5, 2007, at 1:30 PM, Jacek Laskowski wrote:
> On 4/5/07, Mohammad Nour El-Din <no...@gmail.com> wrote:
>> Hi Jacek it is attached to the mail. U can't see it ?
>
> No, I can't. Don't worry - it seems that it's not for me to look at
> this time.
>
> Jacek
>
> --
> Jacek Laskowski
> http://www.JacekLaskowski.pl
>
Re: svn commit: r525022 - in /incubator/openejb/trunk/openejb3/itests/openejb-itests-client: ./ src/main/java/org/apache/o...
Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On 4/5/07, Mohammad Nour El-Din <no...@gmail.com> wrote:
> Hi Jacek it is attached to the mail. U can't see it ?
No, I can't. Don't worry - it seems that it's not for me to look at this time.
Jacek
--
Jacek Laskowski
http://www.JacekLaskowski.pl
Re: svn commit: r525022 - in /incubator/openejb/trunk/openejb3/itests/openejb-itests-client: ./ src/main/java/org/apache/o...
Posted by Mohammad Nour El-Din <no...@gmail.com>.
Hi Jacek it is attached to the mail. U can't see it ?
On 4/5/07, Jacek Laskowski <ja...@laskowski.net.pl> wrote:
>
> On 4/5/07, Mohammad Nour El-Din <no...@gmail.com> wrote:
>
> > Well tattoos are forbidden in Islam so I thought in another solution,
> look
> > at the attached photo I hope you like it :D
>
> Where's the photo?
>
> Jacek
>
> --
> Jacek Laskowski
> http://www.JacekLaskowski.pl
>
--
Thanks
- Mohammad Nour
Re: svn commit: r525022 - in /incubator/openejb/trunk/openejb3/itests/openejb-itests-client: ./ src/main/java/org/apache/o...
Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On 4/5/07, Mohammad Nour El-Din <no...@gmail.com> wrote:
> Well tattoos are forbidden in Islam so I thought in another solution, look
> at the attached photo I hope you like it :D
Where's the photo?
Jacek
--
Jacek Laskowski
http://www.JacekLaskowski.pl
Re: svn commit: r525022 - in /incubator/openejb/trunk/openejb3/itests/openejb-itests-client: ./ src/main/java/org/apache/o...
Posted by Mohammad Nour El-Din <no...@gmail.com>.
Hi David :)...
On 4/4/07, David Blevins <da...@visi.com> wrote:
>
> Yay! Your first commit, Mohammad!! How does it feel? :)
It feels great :D
It's great to have this functionality in, I think people will love
> writing itests even more now.
>
> FYI, your FCRN (First Commit Revision Number) is 525022. Manu sent
> me pictures of his FCRN tattoo -- he's got a cool tiger design. It
> came out really nicely. Can't wait to see yours!
Well tattoos are forbidden in Islam so I thought in another solution, look
at the attached photo I hope you like it :D
-David
>
> On Apr 2, 2007, at 9:19 PM, mnour@apache.org wrote:
>
> > Author: mnour
> > Date: Mon Apr 2 21:19:21 2007
> > New Revision: 525022
> >
> > URL: http://svn.apache.org/viewvc?view=rev&rev=525022
> > Log:
> > issue OPENEJB-519: Annotated test clients enablement
> > http://issues.apache.org/jira/browse/OPENEJB-519
>
>
--
Thanks
- Mohammad Nour
Re: svn commit: r525022 - in /incubator/openejb/trunk/openejb3/itests/openejb-itests-client: ./ src/main/java/org/apache/o...
Posted by David Blevins <da...@visi.com>.
Yay! Your first commit, Mohammad!! How does it feel? :)
It's great to have this functionality in, I think people will love
writing itests even more now.
FYI, your FCRN (First Commit Revision Number) is 525022. Manu sent
me pictures of his FCRN tattoo -- he's got a cool tiger design. It
came out really nicely. Can't wait to see yours!
-David
On Apr 2, 2007, at 9:19 PM, mnour@apache.org wrote:
> Author: mnour
> Date: Mon Apr 2 21:19:21 2007
> New Revision: 525022
>
> URL: http://svn.apache.org/viewvc?view=rev&rev=525022
> Log:
> issue OPENEJB-519: Annotated test clients enablement
> http://issues.apache.org/jira/browse/OPENEJB-519